Sha256: b49ac1fd0670206f78df85e8c86a8e51c380509c7eeacc7f1b5f21698d7616a2
Contents?: true
Size: 981 Bytes
Versions: 21
Compression:
Stored size: 981 Bytes
Contents
module EPUBInfo module Models class Person # Name ({http://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2.6 EPUB2 reference}) # @return [String] attr_accessor :name # File as ({http://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2.6 EPUB2 reference}) # @return [String] attr_accessor :file_as # Role ({http://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2.6 EPUB2 reference}) # @return [String] attr_accessor :role # Should never be called directly, go through EPUBInfo.get 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 # Returns Hash representation of a person # @return [Hash] def to_hash { :name => @name, :file_as => @file_as, :role => @role } end end end end
Version data entries
21 entries across 21 versions & 2 rubygems