defines pluralized property methods on Format objects

This commit is contained in:
Jessica Lynn Suttles 2013-02-18 10:10:31 -08:00
parent bb6fe195af
commit 56b0897f34
2 changed files with 24 additions and 12 deletions

View file

@ -53,7 +53,7 @@ module Microformats2
def to_hash
hash = { type: format_types, properties: {} }
@property_names.each do |method_name|
hash[:properties][method_name.to_sym] = send(method_name).map(&:to_hash)
hash[:properties][method_name.to_sym] = send(method_name.pluralize).map(&:to_hash)
end
hash
end