Class: Smalruby::Hardware::NullHardware
- Inherits:
-
Object
- Object
- Smalruby::Hardware::NullHardware
- Defined in:
- lib/smalruby/hardware/null_hardware.rb
Overview
何もしないハードウェアを表現するクラス
Instance Method Summary collapse
-
#initialize(*_) ⇒ NullHardware
constructor
A new instance of NullHardware.
- #method_missing(*_name) ⇒ Object
Constructor Details
#initialize(*_) ⇒ NullHardware
Returns a new instance of NullHardware.
9 10 |
# File 'lib/smalruby/hardware/null_hardware.rb', line 9 def initialize(*_) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*_name) ⇒ Object
12 13 14 |
# File 'lib/smalruby/hardware/null_hardware.rb', line 12 def method_missing(*_name) @null ||= NullHardware.new end |