Class: Livestatus::Host
- Defined in:
- lib/livestatus/models/host.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from State
#state, #state_class, #state_type
Methods included from CheckType
Methods included from ID
Methods inherited from Base
boolean_attributes, #initialize, #method_missing, table_name, time_attributes
Constructor Details
This class inherits a constructor from Livestatus::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Livestatus::Base
Instance Method Details
#_id ⇒ Object
30 31 32 |
# File 'lib/livestatus/models/host.rb', line 30 def _id display_name end |
#services ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/livestatus/models/host.rb', line 17 def services if @connection @data[:services].map do |service| @connection.get(Livestatus::Service, :filter => [ "host_name = #{name}", "display_name = #{service}" ]).first end else @data[:services] end end |