Class: SimpleRouter::Routes::Route

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Route.



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

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

Instance Attribute Details

#actionObject

Returns the value of attribute action.



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

def action
  @action
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

#pathObject

Returns the value of attribute path.



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

def path
  @path
end

#valuesObject

Returns the value of attribute values.



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

def values
  @values
end

#verbObject

Returns the value of attribute verb.



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

def verb
  @verb
end