Class: Pocketbook::Theme::AssetPaths
- Inherits:
-
Object
- Object
- Pocketbook::Theme::AssetPaths
- Defined in:
- lib/pocketbook/theme.rb
Instance Attribute Summary collapse
-
#available_styles ⇒ Object
readonly
Returns the value of attribute available_styles.
-
#style_name ⇒ Object
readonly
Returns the value of attribute style_name.
-
#style_paths ⇒ Object
readonly
Returns the value of attribute style_paths.
-
#template_path ⇒ Object
readonly
Returns the value of attribute template_path.
Instance Method Summary collapse
-
#initialize(root_path:, manifest:, style: nil, template_override: nil) ⇒ AssetPaths
constructor
A new instance of AssetPaths.
Constructor Details
#initialize(root_path:, manifest:, style: nil, template_override: nil) ⇒ AssetPaths
Returns a new instance of AssetPaths.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/pocketbook/theme.rb', line 41 def initialize(root_path:, manifest:, style: nil, template_override: nil) @root_path = root_path @manifest = manifest @style_map = build_style_map @available_styles = @style_map.keys.sort @template_path = resolve_template_path(template_override) @style_name = resolve_style_name(style) @style_paths = resolve_style_paths(@style_name) end |
Instance Attribute Details
#available_styles ⇒ Object (readonly)
Returns the value of attribute available_styles.
39 40 41 |
# File 'lib/pocketbook/theme.rb', line 39 def available_styles @available_styles end |
#style_name ⇒ Object (readonly)
Returns the value of attribute style_name.
39 40 41 |
# File 'lib/pocketbook/theme.rb', line 39 def style_name @style_name end |
#style_paths ⇒ Object (readonly)
Returns the value of attribute style_paths.
39 40 41 |
# File 'lib/pocketbook/theme.rb', line 39 def style_paths @style_paths end |
#template_path ⇒ Object (readonly)
Returns the value of attribute template_path.
39 40 41 |
# File 'lib/pocketbook/theme.rb', line 39 def template_path @template_path end |