Class: Smalruby::Hardware::NullHardware

Inherits:
Object
  • Object
show all
Defined in:
lib/smalruby/hardware/null_hardware.rb

Overview

何もしないハードウェアを表現するクラス

Instance Method Summary collapse

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