Class: Entruby::OverviewMetric
- Inherits:
-
Object
- Object
- Entruby::OverviewMetric
- Defined in:
- lib/entruby.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Instance Method Summary collapse
- #as_json(*args) ⇒ Object
-
#initialize(name, description, value, weight) ⇒ OverviewMetric
constructor
A new instance of OverviewMetric.
Constructor Details
#initialize(name, description, value, weight) ⇒ OverviewMetric
Returns a new instance of OverviewMetric.
92 93 94 |
# File 'lib/entruby.rb', line 92 def initialize(name, description, value, weight) @name, @description, @value, @weight = name, description, value, weight end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
90 91 92 |
# File 'lib/entruby.rb', line 90 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
90 91 92 |
# File 'lib/entruby.rb', line 90 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
90 91 92 |
# File 'lib/entruby.rb', line 90 def value @value end |
#weight ⇒ Object (readonly)
Returns the value of attribute weight.
90 91 92 |
# File 'lib/entruby.rb', line 90 def weight @weight end |
Instance Method Details
#as_json(*args) ⇒ Object
96 97 98 |
# File 'lib/entruby.rb', line 96 def as_json(*args) {name: name, description: description, value: value, weight: weight} end |