Class: Pageflow::React::PageType
- Defined in:
- lib/pageflow/react/page_type.rb
Instance Attribute Summary collapse
-
#component_name ⇒ Object
readonly
Returns the value of attribute component_name.
-
#file_types ⇒ Object
readonly
Returns the value of attribute file_types.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, options) ⇒ PageType
constructor
A new instance of PageType.
- #template_path ⇒ Object
- #thumbnail_candidates ⇒ Object
- #translation_key_prefix ⇒ Object
Methods inherited from PageType
#category_translation_key, #description_translation_key, #help_entry_translation_key, #json_seed_template, name, #revision_components, #translation_key, #view_helpers
Constructor Details
#initialize(name, options) ⇒ PageType
Returns a new instance of PageType.
6 7 8 9 10 11 |
# File 'lib/pageflow/react/page_type.rb', line 6 def initialize(name, ) @name = name @thumbnail_candidates = [:thumbnail_candidates] @translation_key_prefix = [:translation_key_prefix] @file_types = .fetch(:file_types, []) end |
Instance Attribute Details
#component_name ⇒ Object (readonly)
Returns the value of attribute component_name.
4 5 6 |
# File 'lib/pageflow/react/page_type.rb', line 4 def component_name @component_name end |
#file_types ⇒ Object (readonly)
Returns the value of attribute file_types.
4 5 6 |
# File 'lib/pageflow/react/page_type.rb', line 4 def file_types @file_types end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/pageflow/react/page_type.rb', line 4 def name @name end |
Instance Method Details
#template_path ⇒ Object
13 14 15 |
# File 'lib/pageflow/react/page_type.rb', line 13 def template_path 'pageflow/react/page' end |
#thumbnail_candidates ⇒ Object
17 18 19 |
# File 'lib/pageflow/react/page_type.rb', line 17 def thumbnail_candidates @thumbnail_candidates || super end |
#translation_key_prefix ⇒ Object
21 22 23 |
# File 'lib/pageflow/react/page_type.rb', line 21 def translation_key_prefix @translation_key_prefix || super end |