Class: Mentawai::Core::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/mentawai/core/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#applicationObject

Returns the value of attribute application.



6
7
8
# File 'lib/mentawai/core/action.rb', line 6

def application
  @application
end

#cookiesObject

Returns the value of attribute cookies.



6
7
8
# File 'lib/mentawai/core/action.rb', line 6

def cookies
  @cookies
end

#inputObject

Returns the value of attribute input.



6
7
8
# File 'lib/mentawai/core/action.rb', line 6

def input
  @input
end

#localeObject

Returns the value of attribute locale.



6
7
8
# File 'lib/mentawai/core/action.rb', line 6

def locale
  @locale
end

#outputObject

Returns the value of attribute output.



6
7
8
# File 'lib/mentawai/core/action.rb', line 6

def output
  @output
end

#pageObject

Returns the value of attribute page.



6
7
8
# File 'lib/mentawai/core/action.rb', line 6

def page
  @page
end

#sessionObject

Returns the value of attribute session.



6
7
8
# File 'lib/mentawai/core/action.rb', line 6

def session
  @session
end

Instance Method Details

#errorsObject



17
18
19
20
21
22
23
24
# File 'lib/mentawai/core/action.rb', line 17

def errors
  return nil if output.nil?
  errs = output['errors']
  if not errs
    output['errors'] = errs = Array.new
  end
  errs
end

#fieldErrorsObject



26
27
28
29
30
31
32
33
# File 'lib/mentawai/core/action.rb', line 26

def fieldErrors
  return nil if output.nil?
  fieldErrs = output['fieldErrors']
  if not fieldErrs
    output['fieldErrors'] = fieldErrs = Hash.new
  end
  fieldErrs
end

#messagesObject



8
9
10
11
12
13
14
15
# File 'lib/mentawai/core/action.rb', line 8

def messages
  return nil if output.nil?
  msgs = output['messages']
  if not msgs
    output['messages'] = msgs = Array.new
  end
  msgs
end