Class: Staticky::Generator
- Inherits:
-
Object
- Object
- Staticky::Generator
- Defined in:
- lib/staticky/generator.rb
Defined Under Namespace
Classes: ViewContext
Instance Method Summary collapse
- #call(output_dir) ⇒ Object
-
#initialize(**kwargs) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
Instance Method Details
#call(output_dir) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/staticky/generator.rb', line 25 def call(output_dir, **) view_context = ViewContext.new(**) output_dir = Pathname.new(output_dir). Pathname.glob(@path.join("**/*"), File::FNM_DOTMATCH).each do |file| build_file(file:, output_dir:, view_context:) end end |