Class: KalibroClient::Entities::Miscellaneous::CompoundMetric
- Defined in:
- lib/kalibro_client/entities/miscellaneous/compound_metric.rb
Instance Attribute Summary collapse
-
#script ⇒ Object
Returns the value of attribute script.
Attributes inherited from Metric
#code, #description, #name, #scope, #type
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, code, scope, script) ⇒ CompoundMetric
constructor
A new instance of CompoundMetric.
Methods inherited from Base
Methods included from HashConverters
#convert_to_hash, #date_with_milliseconds, #field_to_hash
Methods included from XMLConverters
#get_xml, #xml_instance_class_name
Constructor Details
#initialize(name, code, scope, script) ⇒ CompoundMetric
Returns a new instance of CompoundMetric.
6 7 8 9 |
# File 'lib/kalibro_client/entities/miscellaneous/compound_metric.rb', line 6 def initialize(name, code, scope, script) super('CompoundMetricSnapshot', name, code, scope) @script = script end |
Instance Attribute Details
#script ⇒ Object
Returns the value of attribute script.
5 6 7 |
# File 'lib/kalibro_client/entities/miscellaneous/compound_metric.rb', line 5 def script @script end |
Class Method Details
.to_object(value) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/kalibro_client/entities/miscellaneous/compound_metric.rb', line 11 def self.to_object(value) if value.is_a?(Hash) new(value['name'], value['code'], value['scope'], value['script']) else value end end |