Class: OSMN::Base
- Inherits:
-
Object
- Object
- OSMN::Base
- Defined in:
- lib/osmn/base.rb
Instance Method Summary collapse
-
#initialize(params) ⇒ Base
constructor
A new instance of Base.
- #params ⇒ Object
- #params=(value) ⇒ Object
Constructor Details
#initialize(params) ⇒ Base
Returns a new instance of Base.
8 9 10 11 |
# File 'lib/osmn/base.rb', line 8 def initialize(params) @params = {} self.params = params end |
Instance Method Details
#params ⇒ Object
24 25 26 |
# File 'lib/osmn/base.rb', line 24 def params @params end |
#params=(value) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/osmn/base.rb', line 13 def params=(value) if value.is_a? Hash value.each do |k,v| @params[k.to_sym] = v end end # We override the format because we expect a JSON response @params[:format] = :json end |