diff options
author | elijah <elijah@riseup.net> | 2012-12-07 12:34:09 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2012-12-07 12:34:09 -0800 |
commit | a085bb3e46ac9cbf8e6f3bfeba79ddac890ef025 (patch) | |
tree | a1e5a318a40fb9bb5a022f9f4db7ba6773dcfa8b /lib | |
parent | 0e971adb4ba67e42942864e04a7fa8bb8eb9c2e4 (diff) |
minor fixes for atom feed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/static_page.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/static_page.rb b/lib/static_page.rb index 679e799..1c5336e 100644 --- a/lib/static_page.rb +++ b/lib/static_page.rb @@ -36,6 +36,10 @@ class StaticPage attr_accessor :path, :children, :name, :props, :parent + ## + ## CLASS METHODS + ## + def self.find(filter) if filter =~ /\// path = filter.split('/').map{|segment| segment.gsub(/[^0-9a-z_-]/, '')} @@ -66,6 +70,10 @@ class StaticPage end end + ## + ## INSTANCE METHODS + ## + def initialize(parent, name) @children = [] @name = name @@ -113,6 +121,10 @@ class StaticPage end end + def id + self.name + end + protected def child_tree |