Class: Bently::Recipe::Prepend
- 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) ⇒ Prepend
constructor
A new instance of Prepend.
Methods inherited from Operation
Constructor Details
#initialize(*args) ⇒ Prepend
Returns a new instance of Prepend.
59 60 61 |
# File 'lib/bently/recipe.rb', line 59 def initialize *args @file, @data = @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
58 59 60 |
# File 'lib/bently/recipe.rb', line 58 def args @args end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
58 59 60 |
# File 'lib/bently/recipe.rb', line 58 def data @data end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
58 59 60 |
# File 'lib/bently/recipe.rb', line 58 def file @file end |
Instance Method Details
#after ⇒ Object
62 63 64 |
# File 'lib/bently/recipe.rb', line 62 def after @data.each_line.each_with_index.map{|l,i| [i+1, l] } end |