Class: TFClient::Models::ShieldCharge
- Defined in:
- lib/textflight-client/models/scan.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Model
#label, #translation, #values_hash
Instance Method Summary collapse
-
#initialize(line:) ⇒ ShieldCharge
constructor
A new instance of ShieldCharge.
- #to_s ⇒ Object
Constructor Details
#initialize(line:) ⇒ ShieldCharge
Returns a new instance of ShieldCharge.
108 109 110 111 |
# File 'lib/textflight-client/models/scan.rb', line 108 def initialize(line:) super(line: line) @value = @values_hash[:charge].to_f end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
106 107 108 |
# File 'lib/textflight-client/models/scan.rb', line 106 def value @value end |
Instance Method Details
#to_s ⇒ Object
113 114 115 |
# File 'lib/textflight-client/models/scan.rb', line 113 def to_s "#{@translation}: #{@value}" end |