Class: PageExporter
- Inherits:
-
Object
- Object
- PageExporter
- Defined in:
- app/models/page_exporter.rb
Instance Attribute Summary collapse
-
#base_dir ⇒ Object
readonly
Returns the value of attribute base_dir.
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(base_dir) ⇒ PageExporter
constructor
A new instance of PageExporter.
Constructor Details
#initialize(base_dir) ⇒ PageExporter
Returns a new instance of PageExporter.
6 7 8 |
# File 'app/models/page_exporter.rb', line 6 def initialize(base_dir) @base_dir = base_dir end |
Instance Attribute Details
#base_dir ⇒ Object (readonly)
Returns the value of attribute base_dir.
4 5 6 |
# File 'app/models/page_exporter.rb', line 4 def base_dir @base_dir end |
Instance Method Details
#export ⇒ Object
10 11 12 13 |
# File 'app/models/page_exporter.rb', line 10 def export Page.roots.in_locale(I18n.default_locale).each { |p| export_page(p) } puts end |