Class: Variation::ImmediateChange

Inherits:
Change
  • Object
show all
Defined in:
lib/variation/changes/immediate_change.rb

Instance Attribute Summary

Attributes inherited from Change

#end_value, #length

Instance Method Summary collapse

Constructor Details

#initialize(hashed_args) ⇒ ImmediateChange

Pass :end_value by hash.



4
5
6
# File 'lib/variation/changes/immediate_change.rb', line 4

def initialize hashed_args
  super(hashed_args.merge(:length => 0))
end

Instance Method Details

#transition_function(start_point) ⇒ Object



8
9
10
# File 'lib/variation/changes/immediate_change.rb', line 8

def transition_function start_point
  ConstantFunction.from_value end_value
end