Class: Rain::Route

Inherits:
Object
  • Object
show all
Includes:
LowType
Defined in:
lib/router/route.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path: String, verbs: Array[String | nil] | []) ⇒ Route

Returns a new instance of Route.



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

def initialize(path: String, verbs: Array[String | nil] | [])
  @path = path
  @verbs = verbs
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/router/route.rb', line 7

def path
  @path
end

#verbsObject (readonly)

Returns the value of attribute verbs.



7
8
9
# File 'lib/router/route.rb', line 7

def verbs
  @verbs
end