Class: Epuber::NavFile::LandmarkItem

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(href, type) ⇒ LandmarkItem



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

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

Instance Attribute Details

#hrefString



43
44
45
# File 'lib/epuber/from_file/nav_file.rb', line 43

def href
  @href
end

#typeString



47
48
49
# File 'lib/epuber/from_file/nav_file.rb', line 47

def type
  @type
end

Class Method Details

.from_node(node) ⇒ LandmarkItem



61
62
63
# File 'lib/epuber/from_file/nav_file.rb', line 61

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