Class: Datadog::CI::Ext::Environment::Providers::LocalGit::GitUser

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/ci/ext/environment/providers/local_git.rb

Direct Known Subclasses

NilUser

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, email, timestamp) ⇒ GitUser

Returns a new instance of GitUser.



133
134
135
136
137
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 133

def initialize(name, email, timestamp)
  @name = name
  @email = email
  @timestamp = timestamp
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



131
132
133
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 131

def email
  @email
end

#nameObject (readonly)

Returns the value of attribute name.



131
132
133
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 131

def name
  @name
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



131
132
133
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 131

def timestamp
  @timestamp
end

Instance Method Details

#dateObject



139
140
141
142
143
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 139

def date
  return nil if timestamp.nil?

  Time.at(timestamp.to_i).utc.to_datetime.iso8601
end