Sha256: d0b9c0845059f02d104161751c9a7107df7647dfa734346936269351f88092cf
Contents?: true
Size: 551 Bytes
Versions: 8
Compression:
Stored size: 551 Bytes
Contents
module Cream::View module Role # admin?, guest? ... Cream::Role.available.each do |role| class_eval %{ def #{role}_area &block area_for_roles(#{role}, &block) end def for_#{role}(&block) for_roles(#{role}, &block) end } end end end module Cream::Helper module Role # admin?, guest? ... Cream::Role.available.each do |role| class_eval %{ def #{role}? has_role? :#{role} end } end end end
Version data entries
8 entries across 8 versions & 1 rubygems