Class: Kropka::Recipe

Inherits:
Object
  • Object
show all
Defined in:
lib/kropka/recipe.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#filesObject

Returns the value of attribute files.



19
20
21
# File 'lib/kropka/recipe.rb', line 19

def files
  @files
end

Class Method Details

.instanceObject



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