class Bicho::Change
Represents a single change inside a bug. History
has multiple ChangeSets, and they have multiple changes.
Public Class Methods
new(client, data)
click to toggle source
# File lib/bicho/history.rb, line 53 def initialize(client, data) @client = client @data = data end
Public Instance Methods
added()
click to toggle source
# File lib/bicho/history.rb, line 42 def added @data['added'] end
field_name()
click to toggle source
# File lib/bicho/history.rb, line 34 def field_name @data['field_name'] end
removed()
click to toggle source
# File lib/bicho/history.rb, line 38 def removed @data['removed'] end
to_h()
click to toggle source
# File lib/bicho/history.rb, line 58 def to_h @data end
to_s()
click to toggle source
# File lib/bicho/history.rb, line 46 def to_s buffer = StringIO.new buffer << "- #{field_name} = #{removed}\n" buffer << "+ #{field_name} = #{added}" buffer.string end