Class: OData::Query::Criteria
- Inherits:
-
Object
- Object
- OData::Query::Criteria
- Defined in:
- lib/odata/query/criteria.rb
Overview
Represents a discreet detail about an OData query. It also validates the criteria based on what the gem knows how to support.
Constant Summary collapse
- REQUIRED_OPTIONS =
Defines the options required to create a new OData::Query::Criteria.
[:operation, :argument]
- SUPPORTED_OPERATIONS =
Defines the operations the OData gem knows how to support.
[ :filter, :order_by, :skip, :top, :select, :expand, :inline_count ]
Instance Method Summary collapse
-
#argument ⇒ String
The query argument of a particular criteria.
-
#initialize(options = {}) ⇒ Criteria
constructor
Creates a new OData::Query::Criteria with the supplied options.
-
#operation ⇒ Symbol
The query operation of a particular criteria.
Constructor Details
#initialize(options = {}) ⇒ Criteria
Creates a new OData::Query::Criteria with the supplied options.
16 17 18 19 20 |
# File 'lib/odata/query/criteria.rb', line 16 def initialize( = {}) = () validate_supported_operation end |
Instance Method Details
#argument ⇒ String
The query argument of a particular criteria.
30 31 32 |
# File 'lib/odata/query/criteria.rb', line 30 def argument [:argument] end |
#operation ⇒ Symbol
The query operation of a particular criteria.
24 25 26 |
# File 'lib/odata/query/criteria.rb', line 24 def operation [:operation] end |