Class: Hospital::Diagnosis::Result
- Inherits:
-
Object
- Object
- Hospital::Diagnosis::Result
- Defined in:
- lib/hospital/diagnosis.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
-
#initialize(message) ⇒ Result
constructor
A new instance of Result.
- #output ⇒ Object
- #put(out) ⇒ Object
Constructor Details
#initialize(message) ⇒ Result
Returns a new instance of Result.
56 57 58 |
# File 'lib/hospital/diagnosis.rb', line 56 def initialize @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
54 55 56 |
# File 'lib/hospital/diagnosis.rb', line 54 def @message end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
54 55 56 |
# File 'lib/hospital/diagnosis.rb', line 54 def prefix @prefix end |
Instance Method Details
#output ⇒ Object
60 61 62 |
# File 'lib/hospital/diagnosis.rb', line 60 def output "#{prefix} #{.gsub(/\n\z/, '').gsub(/\n/, prefix ? "\n " : "\n")}" end |
#put(out) ⇒ Object
64 65 66 |
# File 'lib/hospital/diagnosis.rb', line 64 def put out out.put_diagnosis_result output end |