Class: Zabbix::Api::OpenStruct

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/zabbix/api/client.rb

Overview

Subclass of OpenStruct adds some niceties for REPL etc

Constant Summary collapse

@@prettymode =

If true, inspect returns awesome_inspect instead of default

false

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prettymodeObject

returns current value of prettymode



60
61
62
# File 'lib/zabbix/api/client.rb', line 60

def prettymode
  @@prettymode
end

.prettymode=(aBool) ⇒ Object

sets prettymod to aBool



66
67
68
# File 'lib/zabbix/api/client.rb', line 66

def prettymode=(aBool)
  @@prettymode = aBool
end

Instance Method Details

#inspectObject



71
72
73
74
75
76
77
# File 'lib/zabbix/api/client.rb', line 71

def inspect
  if @@prettymode
    awesome_inspect
  else
    super
  end
end