Class: Raudi::Processing::Base
- Inherits:
-
Object
- Object
- Raudi::Processing::Base
- Defined in:
- lib/raudi/processing.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#source ⇒ Object
Returns the value of attribute source.
Class Method Summary collapse
Instance Method Summary collapse
- #generate_config ⇒ Object
- #generate_interrupts ⇒ Object
-
#initialize(controller, source) ⇒ Base
constructor
A new instance of Base.
- #method_missing(method_name, *args, &block) ⇒ Object
Constructor Details
#initialize(controller, source) ⇒ Base
Returns a new instance of Base.
23 24 25 26 |
# File 'lib/raudi/processing.rb', line 23 def initialize(controller, source) self.controller = controller self.source = source end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/raudi/processing.rb', line 38 def method_missing(method_name, *args, &block) [source, controller].each do |delegate| return delegate.send(method_name, *args, &block) if delegate.respond_to?(method_name) end super end |
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller.
17 18 19 |
# File 'lib/raudi/processing.rb', line 17 def controller @controller end |
#source ⇒ Object
Returns the value of attribute source.
17 18 19 |
# File 'lib/raudi/processing.rb', line 17 def source @source end |
Class Method Details
.inherited(klass) ⇒ Object
19 20 21 |
# File 'lib/raudi/processing.rb', line 19 def self.inherited(klass) Processing.list << klass end |
Instance Method Details
#generate_config ⇒ Object
33 34 35 36 |
# File 'lib/raudi/processing.rb', line 33 def generate_config return unless can_process? config end |
#generate_interrupts ⇒ Object
28 29 30 31 |
# File 'lib/raudi/processing.rb', line 28 def generate_interrupts return unless can_process? interrupts end |