Class: ProcessSettings::Settings

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/process_settings/settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_doc) ⇒ Settings

Returns a new instance of Settings.



12
13
14
15
16
17
18
# File 'lib/process_settings/settings.rb', line 12

def initialize(json_doc)
  json_doc.is_a?(Hash) or raise ArgumentError, "ProcessSettings must be a Hash; got #{json_doc.inspect}"

  AbstractMonitor.ensure_no_symbols(json_doc)

  @json_doc = HashWithHashPath[json_doc]
end

Instance Attribute Details

#json_docObject (readonly)

Returns the value of attribute json_doc.



10
11
12
# File 'lib/process_settings/settings.rb', line 10

def json_doc
  @json_doc
end

Instance Method Details

#==(rhs) ⇒ Object



20
21
22
# File 'lib/process_settings/settings.rb', line 20

def ==(rhs)
  json_doc == rhs.json_doc
end

#eql?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/process_settings/settings.rb', line 24

def eql?(rhs)
  self == rhs
end