Sha256: e3fcf01e74fb8ee85184bd1b0be887133d3e3c0ae0f6a085813765b0415634b5

Contents?: true

Size: 311 Bytes

Versions: 2

Compression:

Stored size: 311 Bytes

Contents

module HornsbyContext
  def self.execute(&block)
    module_eval(&block) if block
  end

  def self.copy_ivars(to, reload = false)
    instance_variables.each do |iv|
      v = instance_variable_get(iv)
      v.reload if reload and v.respond_to?(:reload)
      to.instance_variable_set(iv, v)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinsiliux-hornsby-0.2.5 lib/hornsby_context.rb
sinsiliux-hornsby-0.3.0 lib/hornsby_context.rb