Class: Bently::Recipe::Modify

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) ⇒ Modify

Returns a new instance of Modify.



38
39
40
# File 'lib/bently/recipe.rb', line 38

def initialize *args
  @file, @pattern, @replace = @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



37
38
39
# File 'lib/bently/recipe.rb', line 37

def args
  @args
end

#fileObject (readonly)

Returns the value of attribute file.



37
38
39
# File 'lib/bently/recipe.rb', line 37

def file
  @file
end

#patternObject (readonly)

Returns the value of attribute pattern.



37
38
39
# File 'lib/bently/recipe.rb', line 37

def pattern
  @pattern
end

#replaceObject (readonly)

Returns the value of attribute replace.



37
38
39
# File 'lib/bently/recipe.rb', line 37

def replace
  @replace
end

Instance Method Details

#afterObject



41
42
43
# File 'lib/bently/recipe.rb', line 41

def after
  [[1,@pattern.inspect], [2,@replace.inspect]]
end