Class: Funicular::Plugin::Project
- Inherits:
-
Object
- Object
- Funicular::Plugin::Project
- Defined in:
- lib/funicular/plugin.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #assets_dir ⇒ Object
- #css_paths ⇒ Object
-
#initialize(root) ⇒ Project
constructor
A new instance of Project.
- #source_dir ⇒ Object
- #source_files ⇒ Object
Constructor Details
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
14 15 16 |
# File 'lib/funicular/plugin.rb', line 14 def root @root end |
Instance Method Details
#assets_dir ⇒ Object
20 21 22 |
# File 'lib/funicular/plugin.rb', line 20 def assets_dir root.join("assets") end |
#css_paths ⇒ Object
34 35 36 |
# File 'lib/funicular/plugin.rb', line 34 def css_paths Dir.glob(assets_dir.join("*.css").to_s).sort.map { |path| Pathname(path) } end |
#source_dir ⇒ Object
24 25 26 |
# File 'lib/funicular/plugin.rb', line 24 def source_dir root.join("lib") end |
#source_files ⇒ Object
28 29 30 31 32 |
# File 'lib/funicular/plugin.rb', line 28 def source_files nested = Dir.glob(source_dir.join("*", "**", "*.rb").to_s).sort top_level = Dir.glob(source_dir.join("*.rb").to_s).sort nested + top_level end |