Class: Chef::Telemetry::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/telemetry/session.rb

Instance Method Summary collapse

Constructor Details

#initializeSession

Returns a new instance of Session.



7
8
9
10
11
12
13
# File 'lib/chef/telemetry/session.rb', line 7

def initialize
  @id = if live_session?
          File.read(session_file).chomp
        else
          new_session
        end
end

Instance Method Details

#idObject



15
16
17
18
# File 'lib/chef/telemetry/session.rb', line 15

def id
  FileUtils.touch(session_file)
  @id
end