Sha256: f67c168eb87cb566c728f5aaa2d4b899774b9fac05134231d16e6f68e08063f7
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 Bytes
Contents
module ActsAsLayoutable class TemplateBuilder < ActsAsLayoutable::Builder def method_missing(meth, *args, &block) key = meth.to_s path = args.shift || key.dup template = ActsAsLayoutable::Template.new(path, key) Template.all << template self.collection << template template end end class Template attr_accessor :path, :key def initialize(path, key) @path = path @key = key end class << self attr_accessor :all def all @all ||= [] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts-as-layoutable-0.0.1.7 | lib/acts-as-layoutable/template.rb |