Class: FloorManager::Employee::AttributeAction::Immediate

Inherits:
Base
  • Object
show all
Defined in:
lib/floor_manager/employee/attribute_action.rb

Overview

Stores the action of setting an attribute to an immediate value.

Instance Method Summary collapse

Methods inherited from Base

#get, #set

Constructor Details

#initialize(name, value) ⇒ Immediate

Returns a new instance of Immediate.



52
53
54
55
# File 'lib/floor_manager/employee/attribute_action.rb', line 52

def initialize(name, value)
  super(name)
  @value = value
end

Instance Method Details

#apply(obj, floor, employee) ⇒ Object



56
57
58
# File 'lib/floor_manager/employee/attribute_action.rb', line 56

def apply(obj, floor, employee)
  set(obj, @value)
end