Class: Txtlocal::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/txtlocal/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



17
18
19
# File 'lib/txtlocal/config.rb', line 17

def initialize
  @test = false
end

Instance Attribute Details

#fromObject

The default FROM value for sent messages this can be overridden on a per-message basis



6
7
8
# File 'lib/txtlocal/config.rb', line 6

def from
  @from
end

#passwordObject

The password of the txtlocal account to use when accessing the API



12
13
14
# File 'lib/txtlocal/config.rb', line 12

def password
  @password
end

#testObject

Access the API in test mode



15
16
17
# File 'lib/txtlocal/config.rb', line 15

def test
  @test
end

#usernameObject

The username of the txtlocal account to use when accessing the API



9
10
11
# File 'lib/txtlocal/config.rb', line 9

def username
  @username
end

Instance Method Details

#testing?Boolean

Nice wrapper to check if we’re testing

Returns:

  • (Boolean)


22
23
24
# File 'lib/txtlocal/config.rb', line 22

def testing?
  !!@test
end