Class: Tfl::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/tfl/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) {|_self| ... } ⇒ Client

Returns a new instance of Client.

Yields:

  • (_self)

Yield Parameters:

  • _self (Tfl::Client)

    the object that the method was called on



5
6
7
8
9
10
11
# File 'lib/tfl/client.rb', line 5

def initialize(options = {})
  options.each do |key,value|
    instance_variable_set("@#{key}", value)
  end

  yield(self) if block_given?
end

Instance Attribute Details

#app_idObject

Returns the value of attribute app_id.



3
4
5
# File 'lib/tfl/client.rb', line 3

def app_id
  @app_id
end

#app_keyObject

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

#credentialsObject



13
14
15
16
17
18
# File 'lib/tfl/client.rb', line 13

def credentials
  {
    app_id: @app_id,
    app_key: @app_key
  }
end