Class: Milksteak::Route
- Inherits:
-
Object
- Object
- Milksteak::Route
- Defined in:
- lib/milksteak/cms.rb
Overview
todo: test
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
-
#page ⇒ Object
Returns the value of attribute page.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#primary ⇒ Object
Returns the value of attribute primary.
Instance Method Summary collapse
-
#initialize(page) ⇒ Route
constructor
A new instance of Route.
Constructor Details
#initialize(page) ⇒ Route
Returns a new instance of Route.
91 92 93 94 95 96 97 |
# File 'lib/milksteak/cms.rb', line 91 def initialize(page) @primary = true @length = page.data["route"].length @page = page @pattern = build_expression(page.data["route"]) super() end |
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
89 90 91 |
# File 'lib/milksteak/cms.rb', line 89 def length @length end |
#page ⇒ Object
Returns the value of attribute page.
87 88 89 |
# File 'lib/milksteak/cms.rb', line 87 def page @page end |
#pattern ⇒ Object
Returns the value of attribute pattern.
86 87 88 |
# File 'lib/milksteak/cms.rb', line 86 def pattern @pattern end |
#primary ⇒ Object
Returns the value of attribute primary.
88 89 90 |
# File 'lib/milksteak/cms.rb', line 88 def primary @primary end |