class TFClient::Models::Brightness

Attributes

percent[R]
value[R]

Public Class Methods

new(line:) click to toggle source
Calls superclass method TFClient::Models::Model::new
# File lib/textflight-client/models/nav.rb, line 131
def initialize(line:)
  super(line: line)
  @value = @values_hash[:brightness].to_i
  @percent = ((@value/255.0) * 100).round
end

Public Instance Methods

to_s() click to toggle source
# File lib/textflight-client/models/nav.rb, line 137
def to_s
  %Q[#{@translation}: #{@value} => #{@percent}%]
end