Class: Epuber::OpfFile::SpineItem

Inherits:
Object
  • Object
show all
Defined in:
lib/epuber/from_file/opf_file.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(idref, linear) ⇒ SpineItem

Returns a new instance of SpineItem.



55
56
57
58
# File 'lib/epuber/from_file/opf_file.rb', line 55

def initialize(idref, linear)
  @idref = idref
  @linear = linear
end

Instance Attribute Details

#idrefString

Returns:

  • (String)


49
50
51
# File 'lib/epuber/from_file/opf_file.rb', line 49

def idref
  @idref
end

#linearString

Returns:

  • (String)


53
54
55
# File 'lib/epuber/from_file/opf_file.rb', line 53

def linear
  @linear
end

Class Method Details

.from_node(node) ⇒ SpineItem

Parameters:

Returns:



72
73
74
# File 'lib/epuber/from_file/opf_file.rb', line 72

def self.from_node(node)
  new(node['idref'], node['linear'])
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


64
65
66
# File 'lib/epuber/from_file/opf_file.rb', line 64

def ==(other)
  @idref == other.idref
end