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.
-
#progress_bar ⇒ Object
readonly
Returns the value of attribute progress_bar.
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(base_dir, progress_bar: false) ⇒ PageExporter
constructor
A new instance of PageExporter.
Constructor Details
#initialize(base_dir, progress_bar: false) ⇒ PageExporter
Returns a new instance of PageExporter.
8 9 10 11 |
# File 'app/models/page_exporter.rb', line 8 def initialize(base_dir, progress_bar: false) @base_dir = base_dir @progress_bar = end |
Instance Attribute Details
#base_dir ⇒ Object (readonly)
Returns the value of attribute base_dir.
6 7 8 |
# File 'app/models/page_exporter.rb', line 6 def base_dir @base_dir end |
#progress_bar ⇒ Object (readonly)
Returns the value of attribute progress_bar.
6 7 8 |
# File 'app/models/page_exporter.rb', line 6 def @progress_bar end |
Instance Method Details
#export ⇒ Object
13 14 15 |
# File 'app/models/page_exporter.rb', line 13 def export Page.roots.in_locale(I18n.default_locale).each { |p| export_page(p) } end |