Class: Entruby::OverviewMetric

Inherits:
Object
  • Object
show all
Defined in:
lib/entruby.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject (readonly)

Returns the value of attribute description.



90
91
92
# File 'lib/entruby.rb', line 90

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



90
91
92
# File 'lib/entruby.rb', line 90

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



90
91
92
# File 'lib/entruby.rb', line 90

def value
  @value
end

#weightObject (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