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.
9 10 11 12 |
# File 'app/models/page_exporter.rb', line 9 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.
7 8 9 |
# File 'app/models/page_exporter.rb', line 7 def base_dir @base_dir end |
#progress_bar ⇒ Object (readonly)
Returns the value of attribute progress_bar.
7 8 9 |
# File 'app/models/page_exporter.rb', line 7 def @progress_bar end |
Instance Method Details
#export ⇒ Object
14 15 16 |
# File 'app/models/page_exporter.rb', line 14 def export Page.roots.in_locale(I18n.default_locale).each { |p| export_page(p) } end |