Class: Audiothority::RewriteChange

Inherits:
Change
  • Object
show all
Defined in:
lib/audiothority/change.rb

Instance Method Summary collapse

Constructor Details

#initialize(field, tags) ⇒ RewriteChange

Returns a new instance of RewriteChange.



53
54
55
56
# File 'lib/audiothority/change.rb', line 53

def initialize(field, tags)
  @field = field
  @tags = tags
end

Instance Method Details

#performObject



58
59
60
61
62
# File 'lib/audiothority/change.rb', line 58

def perform
  @tags.each do |tag|
    tag.send(tag_setter, tag.send(@field))
  end
end

#present(display) ⇒ Object



64
65
66
# File 'lib/audiothority/change.rb', line 64

def present(display)
  display.say(%(  #{display.set_color(@field, :yellow)} rewrite field))
end