Class: Peictt::Http::MATCH
Constant Summary collapse
- DEFAULT_METHODS =
%w(GET PATCH DELETE PUT POST).freeze
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(regexp, options = {}) ⇒ MATCH
constructor
A new instance of MATCH.
Constructor Details
#initialize(regexp, options = {}) ⇒ MATCH
Returns a new instance of MATCH.
8 9 10 11 12 13 14 |
# File 'lib/peictt/http/match.rb', line 8 def initialize(regexp, = {}) @regexp = (regexp if regexp.is_a? Regexp) || regexp_error controller_error unless .key? :controller set_controller [:controller] @action = [:action] || action_error get_verbs [:methods] end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
4 5 6 |
# File 'lib/peictt/http/match.rb', line 4 def action @action end |
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
4 5 6 |
# File 'lib/peictt/http/match.rb', line 4 def controller @controller end |
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp.
4 5 6 |
# File 'lib/peictt/http/match.rb', line 4 def regexp @regexp end |
#verb ⇒ Object (readonly)
Returns the value of attribute verb.
4 5 6 |
# File 'lib/peictt/http/match.rb', line 4 def verb @verb end |