defines pluralized property methods on Format objects
This commit is contained in:
parent
bb6fe195af
commit
56b0897f34
2 changed files with 24 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue