Class: Deployme::Settings
- Inherits:
-
Object
- Object
- Deployme::Settings
show all
- Defined in:
- lib/deployme/settings.rb
Instance Method Summary
collapse
Constructor Details
#initialize(klass, config, options) ⇒ Settings
5
6
7
8
9
|
# File 'lib/deployme/settings.rb', line 5
def initialize(klass, config, options)
@prefix = klass.to_s.split('::').last.downcase
@config = OpenStruct.new(klass.defaults.merge(config))
@options = options
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &blk) ⇒ Object
11
12
13
|
# File 'lib/deployme/settings.rb', line 11
def method_missing(name, *args, &blk)
fetch_param(name)
end
|
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
15
16
17
|
# File 'lib/deployme/settings.rb', line 15
def respond_to_missing?(method_name, include_private = false)
detect_param(method_name) || super
end
|