Class: Padrino::Routing::Parent

Inherits:
String
  • Object
show all
Defined in:
lib/padrino-core/application/routing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, options = {}) ⇒ Parent

Returns a new instance of Parent.



39
40
41
42
43
44
# File 'lib/padrino-core/application/routing.rb', line 39

def initialize(value, options={})
  super(value.to_s)
  @map      = options.delete(:map)
  @optional = options.delete(:optional)
  @options  = options
end

Instance Attribute Details

#mapObject (readonly)

Returns the value of attribute map.



33
34
35
# File 'lib/padrino-core/application/routing.rb', line 33

def map
  @map
end

#optionalObject (readonly) Also known as: optional?

Returns the value of attribute optional.



34
35
36
# File 'lib/padrino-core/application/routing.rb', line 34

def optional
  @optional
end

#optionsObject (readonly)

Returns the value of attribute options.



35
36
37
# File 'lib/padrino-core/application/routing.rb', line 35

def options
  @options
end