Class: Bently::Recipe::Insert
- 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.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #after ⇒ Object
-
#initialize(*args) ⇒ Insert
constructor
A new instance of Insert.
Methods inherited from Operation
Constructor Details
#initialize(*args) ⇒ Insert
Returns a new instance of Insert.
69 70 71 |
# File 'lib/bently/recipe.rb', line 69 def initialize *args @file, @data, @options = @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
68 69 70 |
# File 'lib/bently/recipe.rb', line 68 def args @args end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
68 69 70 |
# File 'lib/bently/recipe.rb', line 68 def data @data end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
68 69 70 |
# File 'lib/bently/recipe.rb', line 68 def file @file end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
68 69 70 |
# File 'lib/bently/recipe.rb', line 68 def @options end |
Instance Method Details
#after ⇒ Object
72 73 74 |
# File 'lib/bently/recipe.rb', line 72 def after @data.each_line.each_with_index.map{|l,i| [i+1, l] } end |