Class: Grape::Router::Any

Inherits:
AttributeTranslator show all
Defined in:
lib/grape/router.rb

Instance Attribute Summary collapse

Attributes inherited from AttributeTranslator

#attributes, #request_method, #requirements

Instance Method Summary collapse

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

#indexObject (readonly)

Returns the value of attribute index.



10
11
12
# File 'lib/grape/router.rb', line 10

def index
  @index
end

#patternObject (readonly)

Returns the value of attribute pattern.



10
11
12
# File 'lib/grape/router.rb', line 10

def pattern
  @pattern
end

#regexpObject (readonly)

Returns the value of attribute regexp.



10
11
12
# File 'lib/grape/router.rb', line 10

def regexp
  @regexp
end