Class: OData::AbstractQuery::BasicOption

Inherits:
Object
  • Object
show all
Defined in:
lib/o_data/abstract_query/option.rb

Direct Known Subclasses

Option

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#keyObject (readonly)

Returns the value of attribute key.



12
13
14
# File 'lib/o_data/abstract_query/option.rb', line 12

def key
  @key
end

#queryObject (readonly)

Returns the value of attribute query.



12
13
14
# File 'lib/o_data/abstract_query/option.rb', line 12

def query
  @query
end

#valueObject (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

#inspectObject



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_nameObject



8
9
10
# File 'lib/o_data/abstract_query/option.rb', line 8

def option_name
  @key
end