Class: V::Adapters::Git::Participation

Inherits:
Struct
  • Object
show all
Defined in:
lib/v/adapters/git/participation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#emailObject

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



4
5
6
# File 'lib/v/adapters/git/participation.rb', line 4

def email
  @email
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/v/adapters/git/participation.rb', line 4

def name
  @name
end

#roleObject

Returns the value of attribute role

Returns:

  • (Object)

    the current value of role



4
5
6
# File 'lib/v/adapters/git/participation.rb', line 4

def role
  @role
end

#unix_timestampObject

Returns the value of attribute unix_timestamp

Returns:

  • (Object)

    the current value of unix_timestamp



4
5
6
# File 'lib/v/adapters/git/participation.rb', line 4

def unix_timestamp
  @unix_timestamp
end

Instance Method Details

#timeObject

TODO: take TZ into account



11
12
13
# File 'lib/v/adapters/git/participation.rb', line 11

def time
  Time.at unix_timestamp.to_i
end

#to_sObject



6
7
8
# File 'lib/v/adapters/git/participation.rb', line 6

def to_s
  "#{ role } #{ name } <#{ email }> #{ unix_timestamp }"
end