Class: Pageflow::React::PageType

Inherits:
PageType
  • Object
show all
Defined in:
lib/pageflow/react/page_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options)
  @name = name
  @thumbnail_candidates = options[:thumbnail_candidates]
  @translation_key_prefix = options[:translation_key_prefix]
  @file_types = options.fetch(:file_types, [])
end

Instance Attribute Details

#component_nameObject (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_typesObject (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

#nameObject (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_pathObject



13
14
15
# File 'lib/pageflow/react/page_type.rb', line 13

def template_path
  'pageflow/react/page'
end

#thumbnail_candidatesObject



17
18
19
# File 'lib/pageflow/react/page_type.rb', line 17

def thumbnail_candidates
  @thumbnail_candidates || super
end

#translation_key_prefixObject



21
22
23
# File 'lib/pageflow/react/page_type.rb', line 21

def translation_key_prefix
  @translation_key_prefix || super
end