Class: OpenWeather::QueryBuilder
- Inherits:
-
Object
- Object
- OpenWeather::QueryBuilder
- Defined in:
- lib/open_weather/query_builder.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#query_options ⇒ Object
readonly
Returns the value of attribute query_options.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(args, use_id = true) ⇒ QueryBuilder
constructor
A new instance of QueryBuilder.
Constructor Details
#initialize(args, use_id = true) ⇒ QueryBuilder
Returns a new instance of QueryBuilder.
9 10 11 12 13 |
# File 'lib/open_weather/query_builder.rb', line 9 def initialize(args, use_id=true) clean_args = Array(args) @query_options = clean_args. @arguments = clean_args end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
7 8 9 |
# File 'lib/open_weather/query_builder.rb', line 7 def arguments @arguments end |
#query_options ⇒ Object (readonly)
Returns the value of attribute query_options.
7 8 9 |
# File 'lib/open_weather/query_builder.rb', line 7 def @query_options end |
Instance Method Details
#build ⇒ Object
15 16 17 18 |
# File 'lib/open_weather/query_builder.rb', line 15 def build query = _from_array(arguments) query.merge() end |