Class: Padrino::Routing::Parent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from String

#camelize, #classify, #colorize, #constantize, #html_safe, #pluralize, #underscore

Constructor Details

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

Returns a new instance of Parent.



39
40
41
42
43
44
# File 'padrino-core/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 'padrino-core/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 'padrino-core/lib/padrino-core/application/routing.rb', line 34

def optional
  @optional
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end