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.



5
6
7
# File 'lib/puma/state_file.rb', line 5

def initialize
  @options = {}
end

Instance Method Details

#load(path) ⇒ Object



13
14
15
# File 'lib/puma/state_file.rb', line 13

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

#save(path) ⇒ Object



9
10
11
# File 'lib/puma/state_file.rb', line 9

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