Class: I18n::Hygiene::Result
- Inherits:
-
Object
- Object
- I18n::Hygiene::Result
- Defined in:
- lib/i18n/hygiene/result.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(status, message: "") ⇒ Result
constructor
A new instance of Result.
- #passed? ⇒ Boolean
Constructor Details
#initialize(status, message: "") ⇒ Result
Returns a new instance of Result.
6 7 8 9 |
# File 'lib/i18n/hygiene/result.rb', line 6 def initialize(status, message: "") @status = status @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/i18n/hygiene/result.rb', line 4 def @message end |
Instance Method Details
#passed? ⇒ Boolean
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/i18n/hygiene/result.rb', line 11 def passed? case @status when :pass true when :failure false else raise "Unsupported status" end end |