Class: TFClient::Models::ShieldCharge

Inherits:
Model
  • Object
show all
Defined in:
lib/textflight-client/models/scan.rb

Instance Attribute Summary collapse

Attributes inherited from Model

#label, #translation, #values_hash

Instance Method Summary collapse

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

#valueObject (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_sObject



113
114
115
# File 'lib/textflight-client/models/scan.rb', line 113

def to_s
  "#{@translation}: #{@value}"
end