Class: RobotLab::ExtensionState
- Inherits:
-
Object
- Object
- RobotLab::ExtensionState
- Defined in:
- lib/robot_lab/hook_context.rb
Instance Method Summary collapse
- #ext(name) ⇒ Object
-
#initialize ⇒ ExtensionState
constructor
A new instance of ExtensionState.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ ExtensionState
Returns a new instance of ExtensionState.
153 154 155 |
# File 'lib/robot_lab/hook_context.rb', line 153 def initialize @states = Hash.new { |h, key| h[key] = DotState.new } end |
Instance Method Details
#ext(name) ⇒ Object
157 158 159 |
# File 'lib/robot_lab/hook_context.rb', line 157 def ext(name) @states[name.to_sym] end |
#to_h ⇒ Object
161 162 163 |
# File 'lib/robot_lab/hook_context.rb', line 161 def to_h @states.transform_values(&:to_h) end |