Class: OData::AbstractQuery::Options::InlinecountOption
- Inherits:
-
EnumeratedOption
- Object
- BasicOption
- OData::AbstractQuery::Option
- EnumeratedOption
- OData::AbstractQuery::Options::InlinecountOption
- Defined in:
- lib/o_data/abstract_query/options/inlinecount_option.rb
Instance Attribute Summary
Attributes inherited from BasicOption
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
13 14 15 16 |
# File 'lib/o_data/abstract_query/options/inlinecount_option.rb', line 13 def self.applies_to?(query) return false if query.segments.empty? query.segments.last.is_a?(OData::AbstractQuery::Segments::CollectionSegment) || query.segments.last.is_a?(OData::AbstractQuery::Segments::NavigationPropertySegment) end |
.option_name ⇒ Object
5 6 7 |
# File 'lib/o_data/abstract_query/options/inlinecount_option.rb', line 5 def self.option_name '$inlinecount' end |
.valid_values ⇒ Object
9 10 11 |
# File 'lib/o_data/abstract_query/options/inlinecount_option.rb', line 9 def self.valid_values %w{none allpages} end |