Class: Mentawai::Page::PageMethod
- Inherits:
-
Object
- Object
- Mentawai::Page::PageMethod
show all
- Defined in:
- lib/mentawai/page/page_method.rb
Instance Method Summary
collapse
Constructor Details
#initialize(controller, parameters) ⇒ PageMethod
Returns a new instance of PageMethod.
6
7
8
9
10
|
# File 'lib/mentawai/page/page_method.rb', line 6
def initialize(controller, parameters)
@controller = controller
@action = controller.action
@params = turn_to_hash(parameters)
end
|
Instance Method Details
#action ⇒ Object
30
31
32
|
# File 'lib/mentawai/page/page_method.rb', line 30
def action
@action
end
|
#application ⇒ Object
50
51
52
|
# File 'lib/mentawai/page/page_method.rb', line 50
def application
@action.application
end
|
#consequence ⇒ Object
66
67
68
|
# File 'lib/mentawai/page/page_method.rb', line 66
def consequence
@controller.consequence
end
|
#controller ⇒ Object
62
63
64
|
# File 'lib/mentawai/page/page_method.rb', line 62
def controller
@controller
end
|
#cookies ⇒ Object
46
47
48
|
# File 'lib/mentawai/page/page_method.rb', line 46
def cookies
@action.cookies
end
|
34
35
36
|
# File 'lib/mentawai/page/page_method.rb', line 34
def input
@action.input
end
|
#locale ⇒ Object
54
55
56
|
# File 'lib/mentawai/page/page_method.rb', line 54
def locale
@action.locale
end
|
#output ⇒ Object
38
39
40
|
# File 'lib/mentawai/page/page_method.rb', line 38
def output
@action.output
end
|
#page ⇒ Object
58
59
60
|
# File 'lib/mentawai/page/page_method.rb', line 58
def page
@action.page
end
|
#param?(p) ⇒ Boolean
Also known as:
key?, arg?, has_param?, has_key?, has_arg?
20
21
22
|
# File 'lib/mentawai/page/page_method.rb', line 20
def param?(p)
@params.key?(p)
end
|
#params ⇒ Object
Also known as:
args, param, arg
12
13
14
|
# File 'lib/mentawai/page/page_method.rb', line 12
def params
@params
end
|
#session ⇒ Object
42
43
44
|
# File 'lib/mentawai/page/page_method.rb', line 42
def session
@action.session
end
|