Class: Lotus::Config::Assets Private
- Inherits:
-
Utils::LoadPaths
- Object
- Utils::LoadPaths
- Lotus::Config::Assets
- Defined in:
- lib/lotus/config/assets.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Assets configuration
Constant Summary collapse
- DEFAULT_DIRECTORY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'public'.freeze
Instance Method Summary collapse
- #any? ⇒ Boolean private
- #entries ⇒ Object private
-
#initialize(root) ⇒ Assets
constructor
private
A new instance of Assets.
Constructor Details
#initialize(root) ⇒ Assets
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Assets.
12 13 14 15 |
# File 'lib/lotus/config/assets.rb', line 12 def initialize(root) @root = root @paths = Array(DEFAULT_DIRECTORY) end |
Instance Method Details
#any? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 |
# File 'lib/lotus/config/assets.rb', line 31 def any? @paths.any? end |
#entries ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 26 27 |
# File 'lib/lotus/config/assets.rb', line 19 def entries hash = Hash.new { |k, v| k[v] = [] } each do |path| if path.exist? hash[path.to_s] = path.children.map { |child| "/#{ child.basename }" } end end hash end |