class Capable::Configuration
Constants
- OPTIONS
Attributes
verbose[RW]
Public Class Methods
new()
click to toggle source
# File lib/capable/configuration.rb, line 8 def initialize # these defaults can be overridden in the Tokengen.config block @verbose = false end
Public Instance Methods
[](option)
click to toggle source
Allows config options to be read like a hash
@param [Symbol] option Key for a given attribute
# File lib/capable/configuration.rb, line 16 def [](option) send(option) end
merge(hash)
click to toggle source
Returns a hash of all configurable options merged with hash
@param [Hash] hash A set of configuration options that will take precedence over the defaults
# File lib/capable/configuration.rb, line 31 def merge(hash) to_hash.merge(hash) end
to_hash()
click to toggle source
Returns a hash of all configurable options
# File lib/capable/configuration.rb, line 21 def to_hash OPTIONS.inject({}) do |hash, option| hash[option.to_sym] = self.send(option) hash end end