lib/wombat/metadata.rb in wombat-0.1.2 vs lib/wombat/metadata.rb in wombat-0.1.3
- old
+ new
@@ -1,24 +1,14 @@
#coding: utf-8
+require 'wombat/property_container'
+
module Wombat
- class Metadata < Hash
- def initialize
- self[:event_props] = Properties.new
- self[:venue_props] = Properties.new
- self[:location_props] = Properties.new
+ class Metadata < PropertyContainer
+ def base_url url
+ self[:base_url] = url
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
+ def list_page url
+ self[:list_page] = url
end
end
end
\ No newline at end of file