Class: Harness::Config
- Inherits:
-
Object
- Object
- Harness::Config
- Defined in:
- lib/harness.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#instrument ⇒ Object
readonly
Returns the value of attribute instrument.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#queue ⇒ Object
Returns the value of attribute queue.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
25 26 27 |
# File 'lib/harness.rb', line 25 def initialize @instrument = ActiveSupport::OrderedOptions.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/harness.rb', line 45 def method_missing(name, *args, &block) begin "Harness::#{name.to_s.camelize}Adapter".constantize.config rescue NameError super end end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
21 22 23 |
# File 'lib/harness.rb', line 21 def adapter @adapter end |
#instrument ⇒ Object (readonly)
Returns the value of attribute instrument.
23 24 25 |
# File 'lib/harness.rb', line 23 def instrument @instrument end |
#namespace ⇒ Object
Returns the value of attribute namespace.
22 23 24 |
# File 'lib/harness.rb', line 22 def namespace @namespace end |
#queue ⇒ Object
Returns the value of attribute queue.
21 22 23 |
# File 'lib/harness.rb', line 21 def queue @queue end |
#source ⇒ Object
Returns the value of attribute source.
22 23 24 |
# File 'lib/harness.rb', line 22 def source @source end |