class Wombat::DSL::PropertyGroup
Attributes
wombat_property_name[RW]
Public Class Methods
new(name = nil)
click to toggle source
# File lib/wombat/dsl/property_group.rb, line 8 def initialize(name = nil) @wombat_property_name = name end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
# File lib/wombat/dsl/property_group.rb, line 12 def method_missing(method, *args, &block) property_name = method.to_s if args.empty? && block # TODO: Verify if another property with same name already exists # before overwriting property_group = self[property_name] || PropertyGroup.new(property_name) self[property_name] = property_group property_group.instance_eval(&block) else it = build_property(property_name, *args, &block) self[property_name] = it it.instance_eval(&block) if block_given? && !it.instance_of?(Property) end end
to_ary()
click to toggle source
# File lib/wombat/dsl/property_group.rb, line 28 def to_ary end
wombat_property_format()
click to toggle source
# File lib/wombat/dsl/property_group.rb, line 31 def wombat_property_format :container end
wombat_property_namespaces()
click to toggle source
# File lib/wombat/dsl/property_group.rb, line 35 def wombat_property_namespaces nil end
Protected Instance Methods
build_property(name, *args, &block)
click to toggle source
# File lib/wombat/dsl/property_group.rb, line 41 def build_property(name, *args, &block) if args[1] == :iterator Iterator.new(name, args.first) elsif args[1] == :follow Follower.new(name, args.first) else Property.new(name, *args, &block) end end