Class: Cellcom::Configuration
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Cellcom::Configuration
- Includes:
- Attestor::Validations
- Defined in:
- lib/cellcom.rb
Constant Summary collapse
- CredentialsPolicy =
Attestor::Policy.new(:credentials) do REQUIRED_CREDENTIALS = [:pw, :clid, :gwid ] def validate! defined_keys = REQUIRED_CREDENTIALS & credentials.keys unless REQUIRED_CREDENTIALS == defined_keys invalid "#{(REQUIRED_CREDENTIALS-defined_keys).join(', ')} needs to be defined" end end end
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(h = {}) ⇒ Configuration
Returns a new instance of Configuration.
23 24 25 |
# File 'lib/cellcom.rb', line 23 def initialize(h={}) super default_attributes.merge(h) end |