Class: Namecheap::Configuration
- Inherits:
-
Object
- Object
- Namecheap::Configuration
- Defined in:
- lib/namecheap/configuration.rb
Constant Summary collapse
- REQUIRED_PARAMS =
[:user, :api_key, :ip]
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(opts = {}) ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 |
# File 'lib/namecheap/configuration.rb', line 6 def initialize(opts = {}) raise "Missing configuration options: #{REQUIRED_PARAMS.delete_if { |param| opts.has_key?(param) }.join(', ')}" unless validate_config(opts) @options = opts @options[:sandbox] ||= false @options end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
2 3 4 |
# File 'lib/namecheap/configuration.rb', line 2 def @options end |