Sha256: ed6341b3640d519adedee20b8ce5da143353968aa610839703da46b9c348f40d

Contents?: true

Size: 218 Bytes

Versions: 2

Compression:

Stored size: 218 Bytes

Contents

module L2meter
  class NullObject
    Emitter.instance_methods(false).each do |method_name|
      define_method method_name do |*, &block|
        block && block.call
      end
    end

    def print(*); end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
l2meter-0.12.0 lib/l2meter/null_object.rb
l2meter-0.11.0 lib/l2meter/null_object.rb