Class: Wordpress::WXR::Pages

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/wordpress/wxr/pages.rb

Instance Method Summary collapse

Constructor Details

#initialize(document, wxr) ⇒ Pages

Returns a new instance of Pages.



11
12
13
14
# File 'lib/wordpress/wxr/pages.rb', line 11

def initialize(document, wxr)
  @document = document
  @wxr = wxr
end

Instance Method Details

#eachObject



16
17
18
19
20
21
22
# File 'lib/wordpress/wxr/pages.rb', line 16

def each
  return enum_for(:each) unless block_given?

  nodes.each do |node|
    yield Page.new(node, wxr)
  end
end