Class: Milksteak::Route

Inherits:
Object
  • Object
show all
Defined in:
lib/milksteak/cms.rb

Overview

todo: test

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lengthObject

Returns the value of attribute length.



89
90
91
# File 'lib/milksteak/cms.rb', line 89

def length
  @length
end

#pageObject

Returns the value of attribute page.



87
88
89
# File 'lib/milksteak/cms.rb', line 87

def page
  @page
end

#patternObject

Returns the value of attribute pattern.



86
87
88
# File 'lib/milksteak/cms.rb', line 86

def pattern
  @pattern
end

#primaryObject

Returns the value of attribute primary.



88
89
90
# File 'lib/milksteak/cms.rb', line 88

def primary
  @primary
end