Class: Coradoc::Html::RenderOptions
- Inherits:
-
Object
- Object
- Coradoc::Html::RenderOptions
- Defined in:
- lib/coradoc/html/render_options.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#custom_css ⇒ Object
readonly
Returns the value of attribute custom_css.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#dist_dir ⇒ Object
readonly
Returns the value of attribute dist_dir.
-
#lang ⇒ Object
readonly
Returns the value of attribute lang.
-
#layout ⇒ Object
readonly
Returns the value of attribute layout.
-
#reading_progress ⇒ Object
readonly
Returns the value of attribute reading_progress.
-
#section_number_levels ⇒ Object
readonly
Returns the value of attribute section_number_levels.
-
#section_numbers ⇒ Object
readonly
Returns the value of attribute section_numbers.
-
#theme_toggle ⇒ Object
readonly
Returns the value of attribute theme_toggle.
-
#toc ⇒ Object
readonly
Returns the value of attribute toc.
-
#toc_levels ⇒ Object
readonly
Returns the value of attribute toc_levels.
-
#toc_placement ⇒ Object
readonly
Returns the value of attribute toc_placement.
Instance Method Summary collapse
-
#initialize(layout: :static, lang: 'en', toc: false, toc_levels: 2, section_numbers: false, section_number_levels: 3, author: nil, description: nil, custom_css: nil, dist_dir: nil, theme_toggle: true, reading_progress: true, toc_placement: :auto) ⇒ RenderOptions
constructor
A new instance of RenderOptions.
- #spa? ⇒ Boolean
- #static? ⇒ Boolean
Constructor Details
#initialize(layout: :static, lang: 'en', toc: false, toc_levels: 2, section_numbers: false, section_number_levels: 3, author: nil, description: nil, custom_css: nil, dist_dir: nil, theme_toggle: true, reading_progress: true, toc_placement: :auto) ⇒ RenderOptions
Returns a new instance of RenderOptions.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/coradoc/html/render_options.rb', line 10 def initialize(layout: :static, lang: 'en', toc: false, toc_levels: 2, section_numbers: false, section_number_levels: 3, author: nil, description: nil, custom_css: nil, dist_dir: nil, theme_toggle: true, reading_progress: true, toc_placement: :auto) @layout = layout @lang = lang @toc = toc @toc_levels = toc_levels @section_numbers = section_numbers @section_number_levels = section_number_levels @author = @description = description @custom_css = custom_css @dist_dir = dist_dir @theme_toggle = theme_toggle @reading_progress = reading_progress @toc_placement = toc_placement freeze end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def @author end |
#custom_css ⇒ Object (readonly)
Returns the value of attribute custom_css.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def custom_css @custom_css end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def description @description end |
#dist_dir ⇒ Object (readonly)
Returns the value of attribute dist_dir.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def dist_dir @dist_dir end |
#lang ⇒ Object (readonly)
Returns the value of attribute lang.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def lang @lang end |
#layout ⇒ Object (readonly)
Returns the value of attribute layout.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def layout @layout end |
#reading_progress ⇒ Object (readonly)
Returns the value of attribute reading_progress.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def reading_progress @reading_progress end |
#section_number_levels ⇒ Object (readonly)
Returns the value of attribute section_number_levels.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def section_number_levels @section_number_levels end |
#section_numbers ⇒ Object (readonly)
Returns the value of attribute section_numbers.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def section_numbers @section_numbers end |
#theme_toggle ⇒ Object (readonly)
Returns the value of attribute theme_toggle.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def theme_toggle @theme_toggle end |
#toc ⇒ Object (readonly)
Returns the value of attribute toc.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def toc @toc end |
#toc_levels ⇒ Object (readonly)
Returns the value of attribute toc_levels.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def toc_levels @toc_levels end |
#toc_placement ⇒ Object (readonly)
Returns the value of attribute toc_placement.
6 7 8 |
# File 'lib/coradoc/html/render_options.rb', line 6 def toc_placement @toc_placement end |
Instance Method Details
#spa? ⇒ Boolean
31 32 33 |
# File 'lib/coradoc/html/render_options.rb', line 31 def spa? @layout == :spa end |
#static? ⇒ Boolean
35 36 37 |
# File 'lib/coradoc/html/render_options.rb', line 35 def static? @layout == :static end |