adds Property::Foundation#format

This commit is contained in:
Jessica Lynn Suttles 2013-02-18 12:07:16 -08:00
parent b3ed1207c6
commit bffa750923
2 changed files with 8 additions and 1 deletions

View file

@ -18,6 +18,10 @@ module Microformats2
@to_s ||= value_class_pattern || element_value || text_value
end
def format
formats.first
end
def formats
@formats ||= format_classes.length >=1 ? FormatParser.parse(@element) : []
end