class Tracco::Effort

Public Instance Methods

==(other) click to toggle source
# File lib/tracco/models/effort.rb, line 29
def ==(other)
  return true if other.equal?(self)
  return false unless other.kind_of?(self.class)

  amount == other.amount && date == other.date && Set.new(members) == Set.new(other.members)
end
amount_per_member() click to toggle source
# File lib/tracco/models/effort.rb, line 21
def amount_per_member
  amount / members.size
end
include?(member) click to toggle source
# File lib/tracco/models/effort.rb, line 25
def include?(member)
  members.include?(member)
end
to_s() click to toggle source
# File lib/tracco/models/effort.rb, line 36
def to_s
  "[#{date}] spent #{amount} hours by #{members.map(&:at_username).join(", ")}"
end