Class: Opi::Route

Inherits:
Object
  • Object
show all
Defined in:
lib/opi/route.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, path, options, before, after, block) ⇒ Route

Returns a new instance of Route.



5
6
7
8
9
10
11
12
# File 'lib/opi/route.rb', line 5

def initialize(method, path, options, before, after, block)
  @method = method
  @path = clean_path(path)
  @options = options
  @before = before
  @after = after
  @block = block
end

Instance Attribute Details

#afterObject (readonly)

Returns the value of attribute after.



3
4
5
# File 'lib/opi/route.rb', line 3

def after
  @after
end

#beforeObject (readonly)

Returns the value of attribute before.



3
4
5
# File 'lib/opi/route.rb', line 3

def before
  @before
end

#blockObject (readonly)

Returns the value of attribute block.



3
4
5
# File 'lib/opi/route.rb', line 3

def block
  @block
end

#methodObject (readonly)

Returns the value of attribute method.



3
4
5
# File 'lib/opi/route.rb', line 3

def method
  @method
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/opi/route.rb', line 3

def options
  @options
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/opi/route.rb', line 3

def path
  @path
end