Class: Puma::StateFile

Inherits:
Object
  • Object
show all
Defined in:
lib/puma/state_file.rb

Constant Summary collapse

FIELDS =
%w!control_url control_auth_token pid!

Instance Method Summary collapse

Constructor Details

#initializeStateFile

Returns a new instance of StateFile.



7
8
9
# File 'lib/puma/state_file.rb', line 7

def initialize
  @options = {}
end

Instance Method Details

#load(path) ⇒ Object



15
16
17
# File 'lib/puma/state_file.rb', line 15

def load(path)
  @options = YAML.load File.read(path)
end

#save(path) ⇒ Object



11
12
13
# File 'lib/puma/state_file.rb', line 11

def save(path)
  File.write path, YAML.dump(@options)
end