Class: Mblox::Configuration
- Inherits:
-
Object
- Object
- Mblox::Configuration
- Defined in:
- lib/mblox/configuration.rb
Instance Attribute Summary collapse
-
#log_level ⇒ Object
readonly
Returns the value of attribute log_level.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#on_message_too_long ⇒ Object
Returns the value of attribute on_message_too_long.
-
#outbound_url ⇒ Object
Returns the value of attribute outbound_url.
-
#partner_name ⇒ Object
Returns the value of attribute partner_name.
-
#password ⇒ Object
Returns the value of attribute password.
-
#profile_id ⇒ Object
Returns the value of attribute profile_id.
-
#sender_id ⇒ Object
Returns the value of attribute sender_id.
-
#service_id ⇒ Object
Returns the value of attribute service_id.
-
#tariff ⇒ Object
Returns the value of attribute tariff.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #log_at(level) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 |
# File 'lib/mblox/configuration.rb', line 15 def initialize @logger = Rails.logger if defined?(::Rails) @log_level = :debug @on_message_too_long = :raise_error end |
Instance Attribute Details
#log_level ⇒ Object (readonly)
Returns the value of attribute log_level.
14 15 16 |
# File 'lib/mblox/configuration.rb', line 14 def log_level @log_level end |
#logger ⇒ Object
Returns the value of attribute logger.
14 15 16 |
# File 'lib/mblox/configuration.rb', line 14 def logger @logger end |
#on_message_too_long ⇒ Object
Returns the value of attribute on_message_too_long.
14 15 16 |
# File 'lib/mblox/configuration.rb', line 14 def @on_message_too_long end |
#outbound_url ⇒ Object
Returns the value of attribute outbound_url.
13 14 15 |
# File 'lib/mblox/configuration.rb', line 13 def outbound_url @outbound_url end |
#partner_name ⇒ Object
Returns the value of attribute partner_name.
13 14 15 |
# File 'lib/mblox/configuration.rb', line 13 def partner_name @partner_name end |
#password ⇒ Object
Returns the value of attribute password.
13 14 15 |
# File 'lib/mblox/configuration.rb', line 13 def password @password end |
#profile_id ⇒ Object
Returns the value of attribute profile_id.
13 14 15 |
# File 'lib/mblox/configuration.rb', line 13 def profile_id @profile_id end |
#sender_id ⇒ Object
Returns the value of attribute sender_id.
13 14 15 |
# File 'lib/mblox/configuration.rb', line 13 def sender_id @sender_id end |
#service_id ⇒ Object
Returns the value of attribute service_id.
13 14 15 |
# File 'lib/mblox/configuration.rb', line 13 def service_id @service_id end |
#tariff ⇒ Object
Returns the value of attribute tariff.
13 14 15 |
# File 'lib/mblox/configuration.rb', line 13 def tariff @tariff end |
Instance Method Details
#log_at(level) ⇒ Object
26 27 28 29 |
# File 'lib/mblox/configuration.rb', line 26 def log_at level validate @logger, level @log_level = level end |