Class: Avmtrf1::Result
- Inherits:
-
Object
- Object
- Avmtrf1::Result
- Includes:
- EacRubyUtils::Listable
- Defined in:
- lib/avmtrf1/result.rb
Constant Summary collapse
- TYPE_SUCCESS_COLOR =
'green'
- TYPE_ERROR_COLOR =
'red'
- TYPE_NEUTRAL_COLOR =
'white'
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, output) ⇒ Result
constructor
A new instance of Result.
- #label ⇒ Object
Constructor Details
#initialize(type, output) ⇒ Result
Returns a new instance of Result.
26 27 28 29 30 |
# File 'lib/avmtrf1/result.rb', line 26 def initialize(type, output) validate_type(type) @type = type @output = output end |
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
24 25 26 |
# File 'lib/avmtrf1/result.rb', line 24 def output @output end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
24 25 26 |
# File 'lib/avmtrf1/result.rb', line 24 def type @type end |
Instance Method Details
#label ⇒ Object
32 33 34 |
# File 'lib/avmtrf1/result.rb', line 32 def label output.send(self.class.const_get("type_#{type}_color".upcase)) end |