Class: Bently::Recipe::Create
- Defined in:
- lib/bently/recipe.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
- #after ⇒ Object
-
#initialize(*args) ⇒ Create
constructor
A new instance of Create.
Methods inherited from Operation
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
#args ⇒ Object (readonly)
Returns the value of attribute args.
27 28 29 |
# File 'lib/bently/recipe.rb', line 27 def args @args end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
27 28 29 |
# File 'lib/bently/recipe.rb', line 27 def data @data end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
27 28 29 |
# File 'lib/bently/recipe.rb', line 27 def file @file end |
Instance Method Details
#after ⇒ Object
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 |