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-1.1.28 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.27 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.26 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.25 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.24 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.23 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.22 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.21 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.20 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.19 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.18 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.17 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.16 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.15 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.14 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.13 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.12 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.11 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.10 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb
eitil-1.1.9 eitil_core/lib/eitil_core/argument_helpers/all_args_to_ivars_bang.rb