Class: CasualAPI::ChildProcess

Inherits:
Object
  • Object
show all
Defined in:
lib/child_process.rb

Instance Method Summary collapse

Constructor Details

#initialize(action, parameters, session) ⇒ ChildProcess

Returns a new instance of ChildProcess.



5
6
7
8
9
# File 'lib/child_process.rb', line 5

def initialize(action, parameters, session)
  @action = action
  @params = parameters
  @session = session
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/child_process.rb', line 11

def execute
  obj = Action.fire @action, @params, @session
  {
   redirect: obj.redirect,
   session: obj.session,
   status_code: obj.status_code,
   content_type: obj.content_type,
   body: obj.body,
  }
end