Class: Naught::NullClassBuilder::Commands::DefineExplicitConversions

Inherits:
Naught::NullClassBuilder::Command show all
Defined in:
lib/naught/null_class_builder/commands/define_explicit_conversions.rb

Instance Attribute Summary

Attributes inherited from Naught::NullClassBuilder::Command

#builder

Instance Method Summary collapse

Methods inherited from Naught::NullClassBuilder::Command

#defer, #initialize

Constructor Details

This class inherits a constructor from Naught::NullClassBuilder::Command

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
# File 'lib/naught/null_class_builder/commands/define_explicit_conversions.rb', line 8

def call
  defer do |subject|
    subject.module_eval do
      extend Forwardable
      def_delegators :nil, :to_a, :to_c, :to_f, :to_h, :to_i, :to_r, :to_s
    end
  end
end