1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-26 10:26:48 +02:00
muflax65ngodyewp.onion/lib/episteme.rb
2012-11-13 21:56:59 +01:00

58 lines
884 B
Ruby

# Helper functions for epistemic states.
def techne_title status
case status
when :rough
"needs work"
when :wip
"work in progress"
when :done
"finished"
else
status.to_s
end
end
def episteme_title status
case status
when :broken
"semi-believed"
when :discredited
"not believed"
when :fitness
"fitness challenge"
when :quake3
"Quake 3"
when :death
"fight to the death"
when :inspired
"divinely inspired"
else
status.to_s
end
end
def episteme_cat status
"<a class='episteme' href='/episteme/'>#{episteme_title status}</a>"
end
class Nanoc::Item
def epistemic?
!!self[:episteme]
end
def disowned?
!!self[:disowned]
end
def merged?
!!self[:merged]
end
def merged_link
raise "no merged link for #{self.identifier}" unless self[:merged]
local_link self[:merged]
end
end