class AVR::Value

Attributes

name[R]
value[RW]

Public Class Methods

new(value = 0) click to toggle source
# File lib/avr/value.rb, line 15
def initialize(value = 0)
  @name = T.let(:Constant, Symbol)
  @value = T.let(value, Integer)
end

Public Instance Methods

format() click to toggle source
# File lib/avr/value.rb, line 21
def format
  '%02x'
end
inspect() click to toggle source
# File lib/avr/value.rb, line 41
def inspect
  "#<#{self.class.name} #{self}>"
end
to_i() click to toggle source
# File lib/avr/value.rb, line 31
def to_i
  value.to_i
end
to_s() click to toggle source
# File lib/avr/value.rb, line 36
def to_s
  name.to_s
end
value_hex() click to toggle source
# File lib/avr/value.rb, line 26
def value_hex
  format % value
end