Class: Epuber::OpfFile::GuideItem

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(type, href) ⇒ GuideItem

Returns a new instance of GuideItem.



86
87
88
89
# File 'lib/epuber/from_file/opf_file.rb', line 86

def initialize(type, href)
  @type = type
  @href = href
end

Instance Attribute Details

#hrefString

Returns:

  • (String)


84
85
86
# File 'lib/epuber/from_file/opf_file.rb', line 84

def href
  @href
end

#typeString

Returns:

  • (String)


80
81
82
# File 'lib/epuber/from_file/opf_file.rb', line 80

def type
  @type
end

Class Method Details

.from_node(node) ⇒ GuideItem

Parameters:

Returns:



95
96
97
# File 'lib/epuber/from_file/opf_file.rb', line 95

def self.from_node(node)
  new(node['type'], node['href'])
end