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

Returns a new instance of LandmarkItem.

Parameters:

  • href (String)
  • type (String)


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

Returns:

  • (String)


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

def href
  @href
end

#typeString

Returns:

  • (String)


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

def type
  @type
end

Class Method Details

.from_node(node) ⇒ LandmarkItem

Parameters:

Returns:



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

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