Class: AVR::MemoryByteRegister
- Extended by:
- T::Sig
- Defined in:
- lib/avr/register/memory_byte_register.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#memory_byte ⇒ Object
readonly
Returns the value of attribute memory_byte.
Attributes inherited from Register
Attributes inherited from Value
Instance Method Summary collapse
-
#initialize(cpu, name, memory_byte) ⇒ MemoryByteRegister
constructor
A new instance of MemoryByteRegister.
- #value ⇒ Object
- #value=(new_value) ⇒ Object
Methods inherited from Value
#format, #inspect, #to_i, #to_s, #value_hex
Constructor Details
#initialize(cpu, name, memory_byte) ⇒ MemoryByteRegister
Returns a new instance of MemoryByteRegister.
12 13 14 15 |
# File 'lib/avr/register/memory_byte_register.rb', line 12 def initialize(cpu, name, memory_byte) super(cpu, name) @memory_byte = memory_byte end |
Instance Attribute Details
#memory_byte ⇒ Object (readonly)
Returns the value of attribute memory_byte.
9 10 11 |
# File 'lib/avr/register/memory_byte_register.rb', line 9 def memory_byte @memory_byte end |
Instance Method Details
#value ⇒ Object
18 19 20 |
# File 'lib/avr/register/memory_byte_register.rb', line 18 def value memory_byte.value end |
#value=(new_value) ⇒ Object
23 24 25 |
# File 'lib/avr/register/memory_byte_register.rb', line 23 def value=(new_value) memory_byte.value = new_value end |