Module: Indix::Config
- Defined in:
- lib/indix/config.rb
Class Method Summary collapse
- .app_id ⇒ Object
-
.app_id=(app_id) ⇒ Object
Sets the app_id.
- .app_key ⇒ Object
-
.app_key=(app_key) ⇒ Object
Sets the app_key.
-
.setup(options = {}) ⇒ Object
Set app_id and app_key.
Class Method Details
.app_id ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/indix/config.rb', line 32 def app_id if @app_id @app_id else raise ConfigurationError.new "Cannot complete request. Please provide app_id first" end end |
.app_id=(app_id) ⇒ Object
Sets the app_id
23 24 25 |
# File 'lib/indix/config.rb', line 23 def app_id=(app_id) @app_id = app_id end |
.app_key ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/indix/config.rb', line 40 def app_key if @app_key @app_key else raise ConfigurationError.new "Cannot complete request. Please provide app_key first" end end |
.app_key=(app_key) ⇒ Object
Sets the app_key
28 29 30 |
# File 'lib/indix/config.rb', line 28 def app_key=(app_key) @app_key = app_key end |
.setup(options = {}) ⇒ Object
Set app_id and app_key
49 50 51 52 53 |
# File 'lib/indix/config.rb', line 49 def setup(={}) .map do |k,v| send("#{k}=", v) end end |