Class: Bunto::ThemeAssetsReader
- Inherits:
-
Object
- Object
- Bunto::ThemeAssetsReader
- Defined in:
- lib/bunto/readers/theme_assets_reader.rb
Instance Attribute Summary collapse
-
#site ⇒ Object
readonly
Returns the value of attribute site.
Instance Method Summary collapse
-
#initialize(site) ⇒ ThemeAssetsReader
constructor
A new instance of ThemeAssetsReader.
- #read ⇒ Object
Constructor Details
#initialize(site) ⇒ ThemeAssetsReader
4 5 6 |
# File 'lib/bunto/readers/theme_assets_reader.rb', line 4 def initialize(site) @site = site end |
Instance Attribute Details
#site ⇒ Object (readonly)
Returns the value of attribute site.
3 4 5 |
# File 'lib/bunto/readers/theme_assets_reader.rb', line 3 def site @site end |
Instance Method Details
#read ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bunto/readers/theme_assets_reader.rb', line 8 def read return unless site.theme && site.theme.assets_path Find.find(site.theme.assets_path) do |path| next if File.directory?(path) if File.symlink?(path) Bunto.logger.warn "Theme reader:", "Ignored symlinked asset: #{path}" else read_theme_asset(path) end end end |