Module: Lunetas::Candy::ClassMethods
- Defined in:
- lib/lunetas/candy.rb
Instance Attribute Summary collapse
-
#_url_params ⇒ Object
readonly
Returns the value of attribute _url_params.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
Instance Method Summary collapse
-
#call(env) ⇒ Array
Support to be runned as a Rails Metal.
Instance Attribute Details
#_url_params ⇒ Object (readonly)
Returns the value of attribute _url_params.
160 161 162 |
# File 'lib/lunetas/candy.rb', line 160 def _url_params @_url_params end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
161 162 163 |
# File 'lib/lunetas/candy.rb', line 161 def content_type @content_type end |
Instance Method Details
#call(env) ⇒ Array
Support to be runned as a Rails Metal.
166 167 168 169 170 171 172 173 174 |
# File 'lib/lunetas/candy.rb', line 166 def call(env) url_match = env['PATH_INFO'].match(@_regex) if url_match candy = new(env, url_match.to_a) candy.bite else [404, {"Content-Type" => "text/html", "X-Cascade" => "pass"}, ["Not Found"]] end end |