Class: Epuber::OpfFile::ManifestItem
- Inherits:
-
Object
- Object
- Epuber::OpfFile::ManifestItem
- Defined in:
- lib/epuber/from_file/opf_file.rb
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#initialize(id, href, media_type, properties) ⇒ ManifestItem
constructor
A new instance of ManifestItem.
Constructor Details
#initialize(id, href, media_type, properties) ⇒ ManifestItem
Returns a new instance of ManifestItem.
22 23 24 25 26 27 |
# File 'lib/epuber/from_file/opf_file.rb', line 22 def initialize(id, href, media_type, properties) @id = id @href = href @media_type = media_type @properties = properties end |
Instance Attribute Details
#href ⇒ String
12 13 14 |
# File 'lib/epuber/from_file/opf_file.rb', line 12 def href @href end |
#id ⇒ String
8 9 10 |
# File 'lib/epuber/from_file/opf_file.rb', line 8 def id @id end |
#media_type ⇒ String
16 17 18 |
# File 'lib/epuber/from_file/opf_file.rb', line 16 def media_type @media_type end |
#properties ⇒ String?
20 21 22 |
# File 'lib/epuber/from_file/opf_file.rb', line 20 def properties @properties end |
Class Method Details
.from_node(node) ⇒ ManifestItem
41 42 43 |
# File 'lib/epuber/from_file/opf_file.rb', line 41 def self.from_node(node) new(node['id'], node['href'], node['media-type'], node['properties']) end |
Instance Method Details
#==(other) ⇒ Boolean
33 34 35 |
# File 'lib/epuber/from_file/opf_file.rb', line 33 def ==(other) @id == other.id end |