Class: ScoutApm::GitRevision

Inherits:
Object
  • Object
show all
Defined in:
lib/scout_apm/git_revision.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ GitRevision

Returns a new instance of GitRevision.



7
8
9
10
11
# File 'lib/scout_apm/git_revision.rb', line 7

def initialize(context)
  @context = context
  @sha = detect
  logger.debug "Detected Git Revision [#{@sha}]"
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



5
6
7
# File 'lib/scout_apm/git_revision.rb', line 5

def context
  @context
end

#shaObject

Returns the value of attribute sha.



3
4
5
# File 'lib/scout_apm/git_revision.rb', line 3

def sha
  @sha
end

Instance Method Details

#loggerObject



13
14
15
# File 'lib/scout_apm/git_revision.rb', line 13

def logger
  context.logger
end