Class: OPML2HTML::Outline

Inherits:
Object
  • Object
show all
Defined in:
lib/opml2html/outline.rb

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Outline

Returns a new instance of Outline.



3
4
5
6
# File 'lib/opml2html/outline.rb', line 3

def initialize(node)
  node => Element[name: "outline"]
  @node = node
end

Instance Method Details

#deconstruct_keys(*keys) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/opml2html/outline.rb', line 8

def deconstruct_keys(*keys)
  result = {}
  keys => [keys]
  keys.each do |key|
    case key
    in :text
      result[:text] = (text or next)
    in :created
      result[:created] = (created or next)
    in :children
      result[:children] = (children or next)
    in :xml_url
      result[:xml_url] = (xml_url or next)
    in :description
      result[:description] = description
    end
  end
  result
end