Class: Pocketbook::Theme::Location
- Inherits:
-
Object
- Object
- Pocketbook::Theme::Location
- Defined in:
- lib/pocketbook/theme.rb
Instance Attribute Summary collapse
-
#manifest_path ⇒ Object
readonly
Returns the value of attribute manifest_path.
-
#root_path ⇒ Object
readonly
Returns the value of attribute root_path.
Instance Method Summary collapse
-
#initialize(theme_reference:, cwd: Dir.pwd) ⇒ Location
constructor
A new instance of Location.
Constructor Details
#initialize(theme_reference:, cwd: Dir.pwd) ⇒ Location
Returns a new instance of Location.
11 12 13 14 15 16 17 18 |
# File 'lib/pocketbook/theme.rb', line 11 def initialize(theme_reference:, cwd: Dir.pwd) input_path = Theme.resolve_theme_path(theme_reference, cwd: cwd) @root_path = resolve_root(input_path) raise ArgumentError, "Theme directory not found: #{theme_reference}" unless Dir.exist?(@root_path) @manifest_path = resolve_manifest_path(input_path) end |
Instance Attribute Details
#manifest_path ⇒ Object (readonly)
Returns the value of attribute manifest_path.
9 10 11 |
# File 'lib/pocketbook/theme.rb', line 9 def manifest_path @manifest_path end |
#root_path ⇒ Object (readonly)
Returns the value of attribute root_path.
9 10 11 |
# File 'lib/pocketbook/theme.rb', line 9 def root_path @root_path end |