Class: Rack::Halt::Rule
- Inherits:
-
Object
- Object
- Rack::Halt::Rule
- Defined in:
- lib/rack/halt/rule.rb
Instance Attribute Summary collapse
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
Instance Method Summary collapse
-
#initialize(rule) ⇒ Rule
constructor
A new instance of Rule.
- #matches?(rack_env) ⇒ Boolean
Constructor Details
#initialize(rule) ⇒ Rule
Returns a new instance of Rule.
5 6 7 |
# File 'lib/rack/halt/rule.rb', line 5 def initialize(rule) @rule = rule end |
Instance Attribute Details
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
3 4 5 |
# File 'lib/rack/halt/rule.rb', line 3 def rule @rule end |
Instance Method Details
#matches?(rack_env) ⇒ Boolean
9 10 11 12 |
# File 'lib/rack/halt/rule.rb', line 9 def matches?(rack_env) path = build_path_from_env(rack_env) string_matches?(path, self.rule) end |