class Twigg::Gerrit::Change

Attributes

change_id[R]
full_name[R]
last_updated_on[R]
subject[R]

Public Class Methods

changes() click to toggle source
# File lib/twigg-gerrit/gerrit/change.rb, line 5
def changes
  DB[:changes].
    select(:change_id, :last_updated_on, :subject, :full_name).
    join(:accounts, account_id: :owner_account_id).
    where(status: 'n').
    order(Sequel.desc(:last_updated_on)).
    all.map do |change|
    new(change_id:       change[:change_id],
        subject:         change[:subject],
        full_name:       change[:full_name],
        last_updated_on: change[:last_updated_on])
  end
end
new(options = {}) click to toggle source
# File lib/twigg-gerrit/gerrit/change.rb, line 22
def initialize(options = {})
  raise ArgumentError unless @change_id       = options[:change_id]
  raise ArgumentError unless @subject         = options[:subject]
  raise ArgumentError unless @full_name       = options[:full_name]
  raise ArgumentError unless @last_updated_on = options[:last_updated_on]
end

Public Instance Methods

url() click to toggle source
# File lib/twigg-gerrit/gerrit/change.rb, line 29
def url
  Config.gerrit.web.host + '/' + change_id.to_s
end