Class: Scaffoldish::Scaffold
- Inherits:
-
Object
- Object
- Scaffoldish::Scaffold
- Includes:
- DSL::Template
- Defined in:
- lib/scaffoldish/scaffold.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ Scaffold
constructor
A new instance of Scaffold.
- #run(*args) ⇒ Object
Methods included from DSL::Template
Constructor Details
#initialize(name, &block) ⇒ Scaffold
Returns a new instance of Scaffold.
12 13 14 15 |
# File 'lib/scaffoldish/scaffold.rb', line 12 def initialize(name, &block) @name = name @block = block || Proc.new {} end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
10 11 12 |
# File 'lib/scaffoldish/scaffold.rb', line 10 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/scaffoldish/scaffold.rb', line 10 def name @name end |
Instance Method Details
#run(*args) ⇒ Object
17 18 19 |
# File 'lib/scaffoldish/scaffold.rb', line 17 def run(*args) instance_exec(*args, &block) end |