Class: Script::TopLevel
- Inherits:
-
Object
- Object
- Script::TopLevel
- Defined in:
- lib/script.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#triggers ⇒ Object
readonly
Returns the value of attribute triggers.
Instance Method Summary collapse
- #action(tag, &block) ⇒ Object
- #doit ⇒ Object
-
#initialize(logger, script_source) ⇒ TopLevel
constructor
A new instance of TopLevel.
-
#trigger(tag, &block) ⇒ Object
————————————————————— DSL.
Constructor Details
#initialize(logger, script_source) ⇒ TopLevel
Returns a new instance of TopLevel.
5 6 7 8 9 10 |
# File 'lib/script.rb', line 5 def initialize(logger, script_source) @logger = logger @triggers = {} @actions = {} instance_eval(script_source) end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
12 13 14 |
# File 'lib/script.rb', line 12 def actions @actions end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
12 13 14 |
# File 'lib/script.rb', line 12 def logger @logger end |
#triggers ⇒ Object (readonly)
Returns the value of attribute triggers.
12 13 14 |
# File 'lib/script.rb', line 12 def triggers @triggers end |