Class: Bently::Recipe::Create

Inherits:
Operation show all
Defined in:
lib/bently/recipe.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Operation

#say

Constructor Details

#initialize(*args) ⇒ Create

Returns a new instance of Create.



28
29
30
# File 'lib/bently/recipe.rb', line 28

def initialize *args
  @file, @data = @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



27
28
29
# File 'lib/bently/recipe.rb', line 27

def args
  @args
end

#dataObject (readonly)

Returns the value of attribute data.



27
28
29
# File 'lib/bently/recipe.rb', line 27

def data
  @data
end

#fileObject (readonly)

Returns the value of attribute file.



27
28
29
# File 'lib/bently/recipe.rb', line 27

def file
  @file
end

Instance Method Details

#afterObject



31
32
33
# File 'lib/bently/recipe.rb', line 31

def after
  @data.each_line.each_with_index.map{|l,i| [i+1, l] }
end