Class: SimpleRouter::Routes::Route

Inherits:
Array
  • Object
show all
Defined in:
lib/simple_router/routes.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verb, path, options, &action) ⇒ Route

Returns a new instance of Route.



28
29
30
31
32
33
# File 'lib/simple_router/routes.rb', line 28

def initialize(verb, path, options, &action)
  self.verb    = verb
  self.path    = path
  self.options = options
  self.action  = action
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



26
27
28
# File 'lib/simple_router/routes.rb', line 26

def action
  @action
end

#optionsObject

Returns the value of attribute options.



26
27
28
# File 'lib/simple_router/routes.rb', line 26

def options
  @options
end

#pathObject

Returns the value of attribute path.



26
27
28
# File 'lib/simple_router/routes.rb', line 26

def path
  @path
end

#verbObject

Returns the value of attribute verb.



26
27
28
# File 'lib/simple_router/routes.rb', line 26

def verb
  @verb
end