Class: Controll::Flow::Action::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/controll/flow/action/base.rb

Direct Known Subclasses

Fallback, PathAction

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller, path) ⇒ Base

Returns a new instance of Base.



5
6
7
8
# File 'lib/controll/flow/action/base.rb', line 5

def initialize controller, path
  @controller = controller
  @path = path.to_s
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller.



3
4
5
# File 'lib/controll/flow/action/base.rb', line 3

def controller
  @controller
end

#errorsObject (readonly)

Returns the value of attribute errors.



3
4
5
# File 'lib/controll/flow/action/base.rb', line 3

def errors
  @errors
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/controll/flow/action/base.rb', line 3

def path
  @path
end

Instance Method Details

#set_errors(*errors) ⇒ Object



10
11
12
# File 'lib/controll/flow/action/base.rb', line 10

def set_errors *errors
  @errors = errors.flatten
end