Class: Jekyll::Theme
- Inherits:
-
Object
- Object
- Jekyll::Theme
- Extended by:
- Forwardable
- Defined in:
- lib/jekyll/theme.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #assets_path ⇒ Object
- #includes_path ⇒ Object
-
#initialize(name) ⇒ Theme
constructor
A new instance of Theme.
- #layouts_path ⇒ Object
- #root ⇒ Object
- #runtime_dependencies ⇒ Object
- #sass_path ⇒ Object
Constructor Details
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/jekyll/theme.rb', line 6 def name @name end |
Instance Method Details
#assets_path ⇒ Object
36 37 38 |
# File 'lib/jekyll/theme.rb', line 36 def assets_path @assets_path ||= path_for "assets" end |
#includes_path ⇒ Object
24 25 26 |
# File 'lib/jekyll/theme.rb', line 24 def includes_path @includes_path ||= path_for "_includes" end |
#layouts_path ⇒ Object
28 29 30 |
# File 'lib/jekyll/theme.rb', line 28 def layouts_path @layouts_path ||= path_for "_layouts" end |
#root ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/jekyll/theme.rb', line 15 def root # Must use File.realpath to resolve symlinks created by rbenv # Otherwise, Jekyll.sanitized path with prepend the unresolved root @root ||= File.realpath(gemspec.full_gem_path) rescue Errno::ENOENT, Errno::EACCES, Errno::ELOOP raise "Path #{gemspec.full_gem_path} does not exist, is not accessible "\ "or includes a symbolic link loop" end |
#runtime_dependencies ⇒ Object
40 41 42 |
# File 'lib/jekyll/theme.rb', line 40 def runtime_dependencies gemspec.runtime_dependencies end |
#sass_path ⇒ Object
32 33 34 |
# File 'lib/jekyll/theme.rb', line 32 def sass_path @sass_path ||= path_for "_sass" end |