Sha256: 21e42e0f8e45c30e6002e61c8284ecf708f56761d4c38e87498b0c1f2b3d89b4
Contents?: true
Size: 511 Bytes
Versions: 2
Compression:
Stored size: 511 Bytes
Contents
#coding: utf-8 module Wombat class Metadata < Hash def initialize self[:event_props] = Properties.new self[:venue_props] = Properties.new self[:location_props] = Properties.new end [:event, :venue, :location].each do |m| define_method(m) do self["#{m.to_s}_props".to_sym] end end def method_missing method, *args, &block if method.to_s.end_with? '=' self[method] = args.first else self[method] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wombat-0.1.2 | lib/wombat/metadata.rb |
wombat-0.1.1 | lib/wombat/metadata.rb |