Class: WatchList::DSL::Context::Monitor::Type
- Inherits:
-
Object
- Object
- WatchList::DSL::Context::Monitor::Type
- Defined in:
- lib/watch_list/dsl/context/monitor/type.rb
Constant Summary collapse
- CHILDREN =
{}
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(monitor_name, &block) ⇒ Type
constructor
of class methods.
- #result ⇒ Object
Constructor Details
#initialize(monitor_name, &block) ⇒ Type
of class methods
15 16 17 18 19 |
# File 'lib/watch_list/dsl/context/monitor/type.rb', line 15 def initialize(monitor_name, &block) @monitor_name = monitor_name @result = {} instance_eval(&block) if block end |
Class Method Details
.[](name) ⇒ Object
10 11 12 |
# File 'lib/watch_list/dsl/context/monitor/type.rb', line 10 def [](name) CHILDREN[name] end |
.inherited(child) ⇒ Object
5 6 7 8 |
# File 'lib/watch_list/dsl/context/monitor/type.rb', line 5 def inherited(child) name = child.to_s.split('::').last.downcase CHILDREN[name] = child end |
Instance Method Details
#result ⇒ Object
21 22 23 |
# File 'lib/watch_list/dsl/context/monitor/type.rb', line 21 def result @result end |