Sha256: 4df6126ae6a94a05b0b286a7120d233da95ece709135a3dea2049fe49e453c45

Contents?: true

Size: 390 Bytes

Versions: 72

Compression:

Stored size: 390 Bytes

Contents

# require "eitil_core/argument_helpers/all_args_to_ivars_bang"

require "eitil_core/lookups/gem_path"
require "#{Find.gem_path('binding_of_caller')}/lib/binding_of_caller/mri.rb"

Kernel.module_eval do

  def all_args_to_ivars!
    binding.of_caller(1).local_variables.each do |lvar|
      instance_variable_set("@#{lvar}", binding.of_caller(2).local_variable_get(lvar))
    end
  end

end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
eitil-2.0.8 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-2.0.7 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-2.0.6 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-2.0.5 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-2.0.4 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-2.0.3 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-2.0.2 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-2.0.1 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-2.0.0 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.4.1 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.4.0 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.12 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.11 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.10 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.9 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.8 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.7 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.6 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.5 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.3.4 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb