Class: FriendlyRoutes::Params::Base
- Inherits:
-
Object
- Object
- FriendlyRoutes::Params::Base
- Defined in:
- lib/friendly_routes/params/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #constraints ⇒ Object
-
#initialize(type, name, optional) ⇒ Base
constructor
A new instance of Base.
- #optional? ⇒ Boolean
Constructor Details
#initialize(type, name, optional) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 |
# File 'lib/friendly_routes/params/base.rb', line 8 def initialize(type, name, optional) @type = type @name = name @optional = optional end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/friendly_routes/params/base.rb', line 6 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/friendly_routes/params/base.rb', line 6 def type @type end |
Instance Method Details
#constraints ⇒ Object
18 19 20 |
# File 'lib/friendly_routes/params/base.rb', line 18 def constraints raise NotImplementedError end |
#optional? ⇒ Boolean
14 15 16 |
# File 'lib/friendly_routes/params/base.rb', line 14 def optional? @optional == true end |