Class: Padrino::Routing::Parent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from String

#camelize, #classify, colors, #constantize, #pluralize, #singularize, #undent, #underscore

Constructor Details

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

Returns a new instance of Parent.



205
206
207
208
209
210
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 205

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.



199
200
201
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 199

def map
  @map
end

#optionalObject (readonly) Also known as: optional?

Returns the value of attribute optional.



200
201
202
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 200

def optional
  @optional
end

#optionsObject (readonly)

Returns the value of attribute options.



201
202
203
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/routing.rb', line 201

def options
  @options
end