class Puma::StateFile

Constants

FIELDS

Public Class Methods

new() click to toggle source
# File lib/puma/state_file.rb, line 7
def initialize
  @options = {}
end

Public Instance Methods

load(path) click to toggle source
# File lib/puma/state_file.rb, line 20
def load(path)
  @options = YAML.load File.read(path)
end
save(path, permission = nil) click to toggle source
# File lib/puma/state_file.rb, line 11
def save(path, permission = nil)
  contents =YAML.dump @options
  if permission
    File.write path, contents, mode: 'wb:UTF-8'
  else
    File.write path, contents, mode: 'wb:UTF-8', perm: permission
  end
end