Class: Tr3llo::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/3llo/configuration.rb

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



3
4
5
# File 'lib/3llo/configuration.rb', line 3

def initialize
  @container = Container.new
end

Instance Method Details

#api_keyObject



19
20
21
# File 'lib/3llo/configuration.rb', line 19

def api_key
  container.resolve(:api_key)
end

#api_key=(value) ⇒ Object



15
16
17
# File 'lib/3llo/configuration.rb', line 15

def api_key=(value)
  container.register(:api_key, value)
end

#api_tokenObject



27
28
29
# File 'lib/3llo/configuration.rb', line 27

def api_token
  container.resolve(:api_token)
end

#api_token=(token) ⇒ Object



23
24
25
# File 'lib/3llo/configuration.rb', line 23

def api_token=(token)
  container.register(:api_token, token)
end

#finalize!Object



31
32
33
# File 'lib/3llo/configuration.rb', line 31

def finalize!
  container.freeze
end

#user_idObject



11
12
13
# File 'lib/3llo/configuration.rb', line 11

def user_id
  container.resolve(:user_id)
end

#user_id=(value) ⇒ Object



7
8
9
# File 'lib/3llo/configuration.rb', line 7

def user_id=(value)
  container.register(:user_id, value)
end