lib/epubinfo/models/person.rb in epubinfo-0.2.1 vs lib/epubinfo/models/person.rb in epubinfo-0.2.2
- old
+ new
@@ -6,9 +6,17 @@
def initialize(node)
self.name = node.content
self.file_as = node.attribute('file-as').content rescue nil
self.role = node.attribute('role').content rescue nil
end
+
+ def to_hash
+ {
+ :name => @name,
+ :file_as => @file_as,
+ :role => @role
+ }
+ end
end
end
end