Class: RobotLab::ExtensionState

Inherits:
Object
  • Object
show all
Defined in:
lib/robot_lab/hook_context.rb

Instance Method Summary collapse

Constructor Details

#initializeExtensionState

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_hObject



161
162
163
# File 'lib/robot_lab/hook_context.rb', line 161

def to_h
  @states.transform_values(&:to_h)
end