Module: Traitify::Client::Setup
- Included in:
- Traitify::Client
- Defined in:
- lib/traitify/client/setup.rb
Instance Method Summary collapse
- #add_params(new_params) ⇒ Object
- #add_path(value) ⇒ Object
- #set(options) ⇒ Object
- #set_param(key, value) ⇒ Object
Instance Method Details
#add_params(new_params) ⇒ Object
16 17 18 |
# File 'lib/traitify/client/setup.rb', line 16 def add_params(new_params) set(params: params.merge(new_params)) end |
#add_path(value) ⇒ Object
20 21 22 |
# File 'lib/traitify/client/setup.rb', line 20 def add_path(value) set(path: path + value) end |
#set(options) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/traitify/client/setup.rb', line 4 def set() @type = [:type] if [:type] @verb = [:verb] if [:verb] @path = [:path] if [:path] @params = [:params] if [:params] perform_overrides end |
#set_param(key, value) ⇒ Object
12 13 14 |
# File 'lib/traitify/client/setup.rb', line 12 def set_param(key, value) set(params: params.merge(key => value)) end |