Class: Denglu::Base
- Inherits:
-
Object
- Object
- Denglu::Base
- Defined in:
- lib/denglu/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#app_key ⇒ Object
readonly
Returns the value of attribute app_key.
Instance Method Summary collapse
-
#initialize(app_id = nil, app_key = nil) ⇒ Base
constructor
Initialization.
Constructor Details
#initialize(app_id = nil, app_key = nil) ⇒ Base
Initialization
Example:
>> denglu = Denglu::Base.new
=> #<#Denglu::Base...>
Arguments:
app_id: (String)
app_key: (String)
18 19 20 21 22 23 24 25 |
# File 'lib/denglu/base.rb', line 18 def initialize(app_id=nil, app_key=nil) @app_id = app_id || Config.app_id @app_key = app_key || Config.app_key unless @app_id || @app_key raise 'Uninitialized app_id or app_key!' end end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
6 7 8 |
# File 'lib/denglu/base.rb', line 6 def app_id @app_id end |
#app_key ⇒ Object (readonly)
Returns the value of attribute app_key.
6 7 8 |
# File 'lib/denglu/base.rb', line 6 def app_key @app_key end |