Class: SmsService::Configuration
- Inherits:
-
Object
- Object
- SmsService::Configuration
- Includes:
- Singleton
- Defined in:
- lib/sms_service/configuration.rb
Overview
default parameters for sms service. It will be overridden by the parameters given in configuration file or given at method call This class can have only one instance
Constant Summary collapse
- OPTIONS =
[ :service, :username, :password, :sender ]
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#configure(options) ⇒ Object
merge dafault with the user given options specified using Smsservice.configure method.
-
#initialize ⇒ Configuration
constructor
on initialize pouplate @data with blank config.
Constructor Details
#initialize ⇒ Configuration
on initialize pouplate @data with blank config
20 21 22 |
# File 'lib/sms_service/configuration.rb', line 20 def initialize @data={} end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
10 11 12 |
# File 'lib/sms_service/configuration.rb', line 10 def data @data end |
Instance Method Details
#configure(options) ⇒ Object
merge dafault with the user given options specified using Smsservice.configure method
25 26 27 |
# File 'lib/sms_service/configuration.rb', line 25 def configure() @data.rmerge!() end |