Class: Audiothority::RewriteChange
- Defined in:
- lib/audiothority/change.rb
Instance Method Summary collapse
-
#initialize(field, tags) ⇒ RewriteChange
constructor
A new instance of RewriteChange.
- #perform ⇒ Object
- #present(display) ⇒ Object
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, ) @field = field @tags = end |
Instance Method Details
#perform ⇒ Object
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 |