Class: Rack::Mount::Generation::Route::DynamicSegment

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/mount/generation/route.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, requirement) ⇒ DynamicSegment

Returns a new instance of DynamicSegment.



8
9
10
# File 'lib/rack/mount/generation/route.rb', line 8

def initialize(name, requirement)
  @name, @requirement = name.to_sym, requirement
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/rack/mount/generation/route.rb', line 6

def name
  @name
end

#requirementObject (readonly)

Returns the value of attribute requirement.



6
7
8
# File 'lib/rack/mount/generation/route.rb', line 6

def requirement
  @requirement
end

Instance Method Details

#==(obj) ⇒ Object



12
13
14
# File 'lib/rack/mount/generation/route.rb', line 12

def ==(obj)
  @name == obj.name && @requirement == obj.requirement
end