Class: Phrase::Ota::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/phrase/ota/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/phrase/ota/configuration.rb', line 18

def initialize
  @distribution_id = nil
  @secret_token = nil
  @logger = Logger.new($stdout)
  @app_version = nil
  @poll_interval = 60
  @datacenter = "eu"
  @available_locales = []
  @base_url = nil
  @debug = false
end

Instance Attribute Details

#app_versionObject

Returns the value of attribute app_version.



11
12
13
# File 'lib/phrase/ota/configuration.rb', line 11

def app_version
  @app_version
end

#available_localesObject

Returns the value of attribute available_locales.



14
15
16
# File 'lib/phrase/ota/configuration.rb', line 14

def available_locales
  @available_locales
end

#base_urlObject



30
31
32
# File 'lib/phrase/ota/configuration.rb', line 30

def base_url
  @base_url || datacenter_url
end

#datacenterObject

Returns the value of attribute datacenter.



13
14
15
# File 'lib/phrase/ota/configuration.rb', line 13

def datacenter
  @datacenter
end

#debugObject

Returns the value of attribute debug.



15
16
17
# File 'lib/phrase/ota/configuration.rb', line 15

def debug
  @debug
end

#distribution_idObject

Returns the value of attribute distribution_id.



8
9
10
# File 'lib/phrase/ota/configuration.rb', line 8

def distribution_id
  @distribution_id
end

#loggerObject

Returns the value of attribute logger.



10
11
12
# File 'lib/phrase/ota/configuration.rb', line 10

def logger
  @logger
end

#poll_intervalObject

Returns the value of attribute poll_interval.



12
13
14
# File 'lib/phrase/ota/configuration.rb', line 12

def poll_interval
  @poll_interval
end

#secret_tokenObject

Returns the value of attribute secret_token.



9
10
11
# File 'lib/phrase/ota/configuration.rb', line 9

def secret_token
  @secret_token
end