class Yarrow::ContentMap
Attributes
objects[R]
Public Class Methods
[](name)
click to toggle source
# File lib/yarrow/content_map.rb, line 6 def self.[](name) @@registry[name] end
build(&block)
click to toggle source
# File lib/yarrow/content_map.rb, line 16 def self.build(&block) content_map = ContentMap.new content_map.instance_eval(&block) content_map.objects end
define(name, &block)
click to toggle source
# File lib/yarrow/content_map.rb, line 10 def self.define(name, &block) content_map = ContentMap.new content_map.instance_eval(&block) @@registry[name] = content_map.objects end
new()
click to toggle source
# File lib/yarrow/content_map.rb, line 24 def initialize @objects = Hashie::Mash.new end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
# File lib/yarrow/content_map.rb, line 28 def method_missing(method, *args, &block) @objects[method] = block ? ContentMap.build(&block) : args.first end