Class: OData::AbstractQuery::BasicOption
- Inherits:
-
Object
- Object
- OData::AbstractQuery::BasicOption
- Defined in:
- lib/o_data/abstract_query/option.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(query, key, value = nil) ⇒ BasicOption
constructor
A new instance of BasicOption.
- #inspect ⇒ Object
- #option_name ⇒ Object
Constructor Details
#initialize(query, key, value = nil) ⇒ BasicOption
Returns a new instance of BasicOption.
14 15 16 17 18 |
# File 'lib/o_data/abstract_query/option.rb', line 14 def initialize(query, key, value = nil) @query = query @key = key @value = value end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
12 13 14 |
# File 'lib/o_data/abstract_query/option.rb', line 12 def key @key end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
12 13 14 |
# File 'lib/o_data/abstract_query/option.rb', line 12 def query @query end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
12 13 14 |
# File 'lib/o_data/abstract_query/option.rb', line 12 def value @value end |
Class Method Details
.option_name(option) ⇒ Object
4 5 6 |
# File 'lib/o_data/abstract_query/option.rb', line 4 def self.option_name(option) nil end |
Instance Method Details
#inspect ⇒ Object
20 21 22 |
# File 'lib/o_data/abstract_query/option.rb', line 20 def inspect "#<< #{@query.schema.namespace.to_s}(#{@key.to_s}=#{@value.to_s}) >>" end |
#option_name ⇒ Object
8 9 10 |
# File 'lib/o_data/abstract_query/option.rb', line 8 def option_name @key end |