Class: OData::AbstractQuery::Options::FormatOption

Inherits:
EnumeratedOption show all
Defined in:
lib/o_data/abstract_query/options/format_option.rb

Instance Attribute Summary

Attributes inherited from BasicOption

#key, #query, #value

Class Method Summary collapse

Methods inherited from EnumeratedOption

#initialize, parse!, #valid?, #valid_values

Methods inherited from OData::AbstractQuery::Option

#applies_to?, #initialize, #option_name, parse!, #valid?

Methods inherited from BasicOption

#initialize, #inspect, #option_name

Constructor Details

This class inherits a constructor from OData::AbstractQuery::Options::EnumeratedOption

Class Method Details

.applies_to?(query) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/o_data/abstract_query/options/format_option.rb', line 13

def self.applies_to?(query)
  true
end

.option_nameObject



5
6
7
# File 'lib/o_data/abstract_query/options/format_option.rb', line 5

def self.option_name
  '$format'
end

.valid_valuesObject



9
10
11
# File 'lib/o_data/abstract_query/options/format_option.rb', line 9

def self.valid_values
  %w{atom json}
end