Class: Cyberweb::HtmlTemplatePoweredByRack
- Inherits:
-
Object
- Object
- Cyberweb::HtmlTemplatePoweredByRack
show all
- Defined in:
- lib/cyberweb/experimental/html_template_powered_by_rack.rb
Overview
Cyberweb::HtmlTemplatePoweredByRack
Constant Summary
collapse
- IMAGE_MINZI =
'/home/x/data/images/fotos/cats_and_dogs/minzi/'\
'16.11.2021_Minzi_im_Bad_in_Wohnung_1_Marchettigasse.jpg'
Instance Method Summary
collapse
Instance Method Details
#call(env) ⇒ Object
#
call
A rack-object returns three elements:
(1) The status
(2) the headers
(3) the body
#
40
41
42
43
44
45
46
47
48
|
# File 'lib/cyberweb/experimental/html_template_powered_by_rack.rb', line 40
def call(env)
[
200,
Cyberweb.content_type_HTML,
[
return_the_message_body(env)
]
]
end
|
#return_the_message_body(env) ⇒ Object
#
return_the_message_body
#
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/cyberweb/experimental/html_template_powered_by_rack.rb', line 53
def return_the_message_body(env)
Cyberweb.store_rack_env(env) x = Cyberweb::WebObject.new { :is_a_rack_application }
x.evaluate_from_this_file_via_beautiful_url(
Cyberweb.rack_parameters?.delete('/').to_sym
)
x.internal_render
return x.main_string?
end
|