Class: Dolla::RequestBuilder

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Options
Defined in:
lib/dolla/request_builder.rb

Constant Summary

Constants included from Options

Options::OPTS

Instance Method Summary collapse

Methods included from Options

#get_option

Constructor Details

#initializeRequestBuilder

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_hashObject



18
19
20
# File 'lib/dolla/request_builder.rb', line 18

def to_hash
  @hash
end