Class: AVR::Memory::WatchBinding
- Inherits:
-
Object
- Object
- AVR::Memory::WatchBinding
- Extended by:
- T::Sig
- Defined in:
- lib/avr/memory.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
readonly
Returns the value of attribute filter.
-
#watch ⇒ Object
readonly
Returns the value of attribute watch.
Instance Method Summary collapse
- #include?(address) ⇒ Boolean
-
#initialize(watch, filter = nil) ⇒ WatchBinding
constructor
A new instance of WatchBinding.
Constructor Details
#initialize(watch, filter = nil) ⇒ WatchBinding
Returns a new instance of WatchBinding.
54 55 56 57 |
# File 'lib/avr/memory.rb', line 54 def initialize(watch, filter = nil) @watch = watch @filter = filter end |
Instance Attribute Details
#filter ⇒ Object (readonly)
Returns the value of attribute filter.
51 52 53 |
# File 'lib/avr/memory.rb', line 51 def filter @filter end |
#watch ⇒ Object (readonly)
Returns the value of attribute watch.
48 49 50 |
# File 'lib/avr/memory.rb', line 48 def watch @watch end |
Instance Method Details
#include?(address) ⇒ Boolean
60 61 62 63 64 65 66 |
# File 'lib/avr/memory.rb', line 60 def include?(address) if filter return true if filter&.include?(address) false end true end |