Module: Cuba::Tools::Api
Defined Under Namespace
Modules: Helpers Classes: ValidationError
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#reset_config ⇒ Object
Resets the configuration to the default (empty hash).
- #setup {|config| ... } ⇒ Object
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/cuba/tools/api.rb', line 5 def config @config end |
Instance Method Details
#reset_config ⇒ Object
Resets the configuration to the default (empty hash)
16 17 18 19 20 21 |
# File 'lib/cuba/tools/api.rb', line 16 def reset_config @config = OpenStruct.new({ path: './app/api_params', user_class: 'User' }) end |
#setup {|config| ... } ⇒ Object
7 8 9 |
# File 'lib/cuba/tools/api.rb', line 7 def setup yield config end |