class Bicho::ChangeSet
A collection of related changes.
Public Class Methods
new(client, data)
click to toggle source
# File lib/bicho/history.rb, line 91 def initialize(client, data) @client = client @data = data end
Public Instance Methods
changes()
click to toggle source
@return [Array<Change>] list of changes, with details of what changed
# File lib/bicho/history.rb, line 85 def changes @data['changes'].map do |change| Change.new(@client, change) end end
date()
click to toggle source
return [Date] The date the bug activity/change happened. @deprecated Use {#timestamp} instead
# File lib/bicho/history.rb, line 69 def date warn 'Deprecated. Use timestamp instead' timestamp end
timestamp()
click to toggle source
return [Date] The date the bug activity/change happened.
# File lib/bicho/history.rb, line 75 def timestamp @data['when'].to_time end
to_h()
click to toggle source
# File lib/bicho/history.rb, line 105 def to_h { who: who, timestamp: timestamp, changes: changes.map(&:to_h) } end
to_s()
click to toggle source
# File lib/bicho/history.rb, line 96 def to_s buffer = StringIO.new buffer << "#{timestamp}- #{who}\n" changes.each do |diff| buffer << "#{diff}\n" end buffer.string end
who()
click to toggle source
@return [String] The login name of the user who performed the bug change
# File lib/bicho/history.rb, line 80 def who @data['who'] end