Class: Tfl::Client
- Inherits:
-
Object
- Object
- Tfl::Client
- Defined in:
- lib/tfl/client.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#app_key ⇒ Object
Returns the value of attribute app_key.
Instance Method Summary collapse
- #credentials ⇒ Object
-
#initialize(options = {}) {|_self| ... } ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Client
Returns a new instance of Client.
5 6 7 8 9 10 11 |
# File 'lib/tfl/client.rb', line 5 def initialize( = {}) .each do |key,value| instance_variable_set("@#{key}", value) end yield(self) if block_given? end |
Instance Attribute Details
#app_id ⇒ Object
Returns the value of attribute app_id.
3 4 5 |
# File 'lib/tfl/client.rb', line 3 def app_id @app_id end |
#app_key ⇒ Object
Returns the value of attribute app_key.
3 4 5 |
# File 'lib/tfl/client.rb', line 3 def app_key @app_key end |
Instance Method Details
#credentials ⇒ Object
13 14 15 16 17 18 |
# File 'lib/tfl/client.rb', line 13 def credentials { app_id: @app_id, app_key: @app_key } end |