Class: PCPEasy::Metric::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/pcp_easy/metric/value.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, instance) ⇒ Value

Returns a new instance of Value.



6
7
8
9
# File 'lib/pcp_easy/metric/value.rb', line 6

def initialize(value, instance)
  @value = value
  @instance = instance
end

Instance Attribute Details

#instanceObject (readonly)

Returns the value of attribute instance.



4
5
6
# File 'lib/pcp_easy/metric/value.rb', line 4

def instance
  @instance
end

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/pcp_easy/metric/value.rb', line 4

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
14
15
# File 'lib/pcp_easy/metric/value.rb', line 11

def ==(other)
  self.class == other.class && \
  value == other.value && \
  instance == other.instance
end