Class: Dolla::RequestBuilder
- Inherits:
-
Object
- Object
- Dolla::RequestBuilder
- Extended by:
- Forwardable
- Includes:
- Options
- Defined in:
- lib/dolla/request_builder.rb
Constant Summary
Constants included from Options
Instance Method Summary collapse
-
#initialize ⇒ RequestBuilder
constructor
A new instance of RequestBuilder.
- #set_option(key, value) ⇒ Object
- #to_hash ⇒ Object
Methods included from Options
Constructor Details
#initialize ⇒ RequestBuilder
Returns a new instance of RequestBuilder.
8 9 10 |
# File 'lib/dolla/request_builder.rb', line 8 def initialize @hash = ActiveSupport::OrderedHash.new end |
Instance Method Details
#set_option(key, value) ⇒ Object
12 13 14 15 16 |
# File 'lib/dolla/request_builder.rb', line 12 def set_option key, value option_key = (key == :order!)? key : get_option( key ) @hash[ option_key ] = value self end |
#to_hash ⇒ Object
18 19 20 |
# File 'lib/dolla/request_builder.rb', line 18 def to_hash @hash end |