Sha256: 0ce3ff4eb5e68ad2df0ef4117957e89a117927b8674f183aea55e62704f15c18
Contents?: true
Size: 661 Bytes
Versions: 14
Compression:
Stored size: 661 Bytes
Contents
module Cream::View module Role # admin?, guest? ... if defined? Cream::Role 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 end module Cream::Helper module Role # admin?, guest? ... if defined? Cream::Role Cream::Role.available.each do |role| class_eval %{ def #{role}? has_role? :#{role} end } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems