Added support for API feature lists.
This commit is contained in:
parent
b4745890f5
commit
9a2217a6bb
|
@ -96,7 +96,25 @@ module Google
|
|||
# @return [TrueClass, FalseClass]
|
||||
# Whether or not this is the preferred version of this API.
|
||||
def preferred
|
||||
return @discovery_document['preferred']
|
||||
return !!@discovery_document['preferred']
|
||||
end
|
||||
|
||||
##
|
||||
# Returns the list of API features.
|
||||
#
|
||||
# @return [Array]
|
||||
# The features supported by this API.
|
||||
def features
|
||||
return @discovery_document['features'] || []
|
||||
end
|
||||
|
||||
##
|
||||
# Returns true if this API uses a data wrapper.
|
||||
#
|
||||
# @return [TrueClass, FalseClass]
|
||||
# Whether or not this API uses a data wrapper.
|
||||
def data_wrapper?
|
||||
return self.features.include?('dataWrapper')
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in New Issue