Class: Pageflow::Theme
- Inherits:
-
Object
- Object
- Pageflow::Theme
- Defined in:
- lib/pageflow/theme.rb
Instance Attribute Summary collapse
-
#directory_name ⇒ Object
readonly
Returns the value of attribute directory_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #change_to_parent_page_at_storyline_boundary? ⇒ Boolean
- #has_home_button? ⇒ Boolean
- #has_overview_button? ⇒ Boolean
- #has_scroll_back_indicator? ⇒ Boolean
- #hide_text_on_swipe? ⇒ Boolean
-
#initialize(name, options = {}) ⇒ Theme
constructor
A new instance of Theme.
- #page_change_by_scrolling? ⇒ Boolean
- #stylesheet_path ⇒ Object
- #supports_emphasized_pages? ⇒ Boolean
- #supports_scroll_indicator_modes? ⇒ Boolean
Constructor Details
#initialize(name, options = {}) ⇒ Theme
Returns a new instance of Theme.
5 6 7 8 9 |
# File 'lib/pageflow/theme.rb', line 5 def initialize(name, = {}) @name = name.to_s @directory_name = name.to_s @options = end |
Instance Attribute Details
#directory_name ⇒ Object (readonly)
Returns the value of attribute directory_name.
3 4 5 |
# File 'lib/pageflow/theme.rb', line 3 def directory_name @directory_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/pageflow/theme.rb', line 3 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/pageflow/theme.rb', line 3 def @options end |
Instance Method Details
#change_to_parent_page_at_storyline_boundary? ⇒ Boolean
39 40 41 |
# File 'lib/pageflow/theme.rb', line 39 def change_to_parent_page_at_storyline_boundary? !@options[:no_change_to_parent_page_at_storyline_boundary] end |
#has_home_button? ⇒ Boolean
15 16 17 |
# File 'lib/pageflow/theme.rb', line 15 def !@options[:no_home_button] end |
#has_overview_button? ⇒ Boolean
19 20 21 |
# File 'lib/pageflow/theme.rb', line 19 def !@options[:no_overview_button] end |
#has_scroll_back_indicator? ⇒ Boolean
23 24 25 |
# File 'lib/pageflow/theme.rb', line 23 def has_scroll_back_indicator? !!@options[:scroll_back_indicator] end |
#hide_text_on_swipe? ⇒ Boolean
43 44 45 |
# File 'lib/pageflow/theme.rb', line 43 def hide_text_on_swipe? !@options[:no_hide_text_on_swipe] end |
#page_change_by_scrolling? ⇒ Boolean
35 36 37 |
# File 'lib/pageflow/theme.rb', line 35 def page_change_by_scrolling? !@options[:no_page_change_by_scrolling] end |
#stylesheet_path ⇒ Object
11 12 13 |
# File 'lib/pageflow/theme.rb', line 11 def stylesheet_path "pageflow/themes/#{name}.css" end |
#supports_emphasized_pages? ⇒ Boolean
31 32 33 |
# File 'lib/pageflow/theme.rb', line 31 def supports_emphasized_pages? !!@options[:emphasized_pages] end |
#supports_scroll_indicator_modes? ⇒ Boolean
27 28 29 |
# File 'lib/pageflow/theme.rb', line 27 def supports_scroll_indicator_modes? !!@options[:scroll_indicator_modes] end |