Class: Rack::Mount::Generation::Route::DynamicSegment
- Inherits:
-
Object
- Object
- Rack::Mount::Generation::Route::DynamicSegment
- Defined in:
- lib/rack/mount/generation/route.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#requirement ⇒ Object
readonly
Returns the value of attribute requirement.
Instance Method Summary collapse
- #==(obj) ⇒ Object
-
#initialize(name, requirement) ⇒ DynamicSegment
constructor
A new instance of DynamicSegment.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/rack/mount/generation/route.rb', line 6 def name @name end |
#requirement ⇒ Object (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 |