Class: Grape::Router::Any
- Inherits:
-
AttributeTranslator
- Object
- AttributeTranslator
- Grape::Router::Any
- Defined in:
- lib/grape/router.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
Attributes inherited from AttributeTranslator
#attributes, #request_method, #requirements
Instance Method Summary collapse
-
#initialize(pattern, regexp, index, **attributes) ⇒ Any
constructor
A new instance of Any.
Methods inherited from AttributeTranslator
#method_missing, #respond_to_missing?, #to_h
Constructor Details
#initialize(pattern, regexp, index, **attributes) ⇒ Any
Returns a new instance of Any.
11 12 13 14 15 16 |
# File 'lib/grape/router.rb', line 11 def initialize(pattern, regexp, index, **attributes) @pattern = pattern @regexp = regexp @index = index super(attributes) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Grape::Router::AttributeTranslator
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
10 11 12 |
# File 'lib/grape/router.rb', line 10 def index @index end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
10 11 12 |
# File 'lib/grape/router.rb', line 10 def pattern @pattern end |
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp.
10 11 12 |
# File 'lib/grape/router.rb', line 10 def regexp @regexp end |