class EPUBInfo::Models::Identifier
Attributes
identifier[RW]
Identifier
({idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2.1 EPUB2 reference}) @return [String]
scheme[RW]
Scheme ({idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2.1 EPUB2 reference}) @return [String]
Public Class Methods
new(node)
click to toggle source
Should never be called directly, go through EPUBInfo.get
# File lib/epubinfo/models/identifier.rb, line 12 def initialize(node) self.identifier = node.content self.scheme = node.attribute('scheme').content rescue nil end
Public Instance Methods
to_hash()
click to toggle source
Returns Hash representation of an identifier @return [Hash]
# File lib/epubinfo/models/identifier.rb, line 19 def to_hash { :identifier => @identifier, :scheme => @scheme } end