Module: Formalism::ModelForms::Move

Includes:
Base
Defined in:
lib/formalism/model_forms/move.rb

Overview

Base form for model moving

Instance Attribute Summary collapse

Attributes included from Base

#instance

Instance Method Summary collapse

Methods included from Base

#before_retry

Instance Attribute Details

#directionObject (readonly)

Returns the value of attribute direction.



11
12
13
# File 'lib/formalism/model_forms/move.rb', line 11

def direction
  @direction
end

Instance Method Details

#initialize(direction, primary_field_value, how_many = 1) ⇒ Object



13
14
15
16
17
18
# File 'lib/formalism/model_forms/move.rb', line 13

def initialize(direction, primary_field_value, how_many = 1)
	@direction = direction.to_sym
	@how_many = how_many.to_i

	super(primary_field_name => primary_field_value)
end