Class: Gexp::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/gexp/handler.rb,
lib/gexp/handler/check.rb,
lib/gexp/handler/caller.rb,
lib/gexp/handler/modify.rb,
lib/gexp/handler/producer.rb,
lib/gexp/handler/check/item.rb,
lib/gexp/handler/transition.rb,
lib/gexp/handler/check/resources.rb,
lib/gexp/handler/modify/resources.rb,
lib/gexp/handler/transition/builder.rb

Direct Known Subclasses

Caller, Check, Modify

Defined Under Namespace

Classes: Caller, Check, Modify, Producer, Transition

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object = nil, params = {}, objects = nil, full_params = nil) ⇒ Handler

Returns a new instance of Handler.



11
12
13
14
15
16
17
# File 'lib/gexp/handler.rb', line 11

def initialize(object = nil, params = {}, objects = nil, full_params = nil)
  @object      = object
  @params      = params
  @objects     = objects
  @user        = (@objects || {})[:subject]
  @full_params = full_params
end

Instance Attribute Details

#objectObject

Базовый класс обработчиков



5
6
7
# File 'lib/gexp/handler.rb', line 5

def object
  @object
end

#objectsObject

Базовый класс обработчиков



5
6
7
# File 'lib/gexp/handler.rb', line 5

def objects
  @objects
end

#paramsObject

Базовый класс обработчиков



5
6
7
# File 'lib/gexp/handler.rb', line 5

def params
  @params
end

#userObject

Базовый класс обработчиков



5
6
7
# File 'lib/gexp/handler.rb', line 5

def user
  @user
end

Instance Method Details

#process(params = nil) ⇒ Object



19
20
21
22
# File 'lib/gexp/handler.rb', line 19

def process(params = nil)
  raise NotImplementedError.new \
    'Override process handler method'
end