Class: Noodall::Site
Class Attribute Summary collapse
-
.map ⇒ Object
Returns the value of attribute map.
-
.permalinks ⇒ Object
Returns the value of attribute permalinks.
Class Method Summary collapse
Class Attribute Details
.map ⇒ Object
Returns the value of attribute map.
5 6 7 |
# File 'lib/noodall/site.rb', line 5 def map @map end |
.permalinks ⇒ Object
Returns the value of attribute permalinks.
5 6 7 |
# File 'lib/noodall/site.rb', line 5 def permalinks @permalinks end |
Class Method Details
.build! ⇒ Object
7 8 9 10 11 12 |
# File 'lib/noodall/site.rb', line 7 def build! return false unless map.is_a?(Hash) map.each do |permalink, attributes| build_node(permalink, attributes) end end |
.contains?(permalink) ⇒ Boolean
14 15 16 17 18 19 20 21 22 |
# File 'lib/noodall/site.rb', line 14 def contains?(permalink) self.permalinks ||= [] return false unless map.is_a?(Hash) return true if map.keys.include?(permalink) map.values.each do |attrubutes| extract_permalinks(attrubutes) end return permalinks.include?(permalink) end |