Class: PCPEasy::PMAPI::PmDesc

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/pcp_easy/pmapi/pm_desc.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/pcp_easy/pmapi/pm_desc.rb', line 37

def ==(other)
  self.class == other.class && \
  pmid == other.pmid && \
  type == other.type && \
  indom == other.indom && \
  sem == other.sem && \
  units == other.units

end

#indomObject



25
26
27
# File 'lib/pcp_easy/pmapi/pm_desc.rb', line 25

def indom
  self[:indom]
end

#inspectObject



13
14
15
# File 'lib/pcp_easy/pmapi/pm_desc.rb', line 13

def inspect
  "<#{self.class.to_s}:#{object_id} pmid=#{pmid} type=#{type} indom=#{indom} sem=#{sem} units=#{units.inspect}>"
end

#pmidObject



17
18
19
# File 'lib/pcp_easy/pmapi/pm_desc.rb', line 17

def pmid
  self[:pmid]
end

#semObject



29
30
31
# File 'lib/pcp_easy/pmapi/pm_desc.rb', line 29

def sem
  self[:sem]
end

#typeObject



21
22
23
# File 'lib/pcp_easy/pmapi/pm_desc.rb', line 21

def type
  self[:type]
end

#unitsObject



33
34
35
# File 'lib/pcp_easy/pmapi/pm_desc.rb', line 33

def units
  @units ||= PmUnits.new(self[:units])
end