Class: Kropka::Recipe
- Inherits:
-
Object
- Object
- Kropka::Recipe
- Defined in:
- lib/kropka/recipe.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Class Method Summary collapse
Instance Method Summary collapse
- #apply! ⇒ Object
-
#initialize(&block) ⇒ Recipe
constructor
A new instance of Recipe.
Constructor Details
#initialize(&block) ⇒ Recipe
Returns a new instance of Recipe.
7 8 9 10 11 12 13 |
# File 'lib/kropka/recipe.rb', line 7 def initialize(&block) self.files = [] instance_eval(&block) if block_given? @@instance = self end |
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files.
19 20 21 |
# File 'lib/kropka/recipe.rb', line 19 def files @files end |
Class Method Details
.instance ⇒ Object
3 4 5 |
# File 'lib/kropka/recipe.rb', line 3 def self.instance @@instance end |
Instance Method Details
#apply! ⇒ Object
15 16 17 |
# File 'lib/kropka/recipe.rb', line 15 def apply! files.map(&:copy!) end |