Class: Modular::LayoutGenerator
- Inherits:
-
Object
- Object
- Modular::LayoutGenerator
- Defined in:
- lib/modular/layout_generator.rb
Defined Under Namespace
Classes: ERBContext
Class Method Summary collapse
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(id, params = {}) ⇒ LayoutGenerator
constructor
A new instance of LayoutGenerator.
Constructor Details
#initialize(id, params = {}) ⇒ LayoutGenerator
Returns a new instance of LayoutGenerator.
26 27 28 29 |
# File 'lib/modular/layout_generator.rb', line 26 def initialize(id, params= {}) @id = id @params = params end |
Class Method Details
.generate(id, params = {}) ⇒ Object
17 18 19 |
# File 'lib/modular/layout_generator.rb', line 17 def self.generate(id, params = {}) new(id, params).generate end |
Instance Method Details
#generate ⇒ Object
21 22 23 24 |
# File 'lib/modular/layout_generator.rb', line 21 def generate write_layout unless layout_exists? filename.to_s end |