Sha256: afdd2550f8ca39c1b190943c463d4e1968535e57adcfeb90354a2691e266dd34

Contents?: true

Size: 309 Bytes

Versions: 205

Compression:

Stored size: 309 Bytes

Contents

class Module
  def alias_accessor(new, orig)
    alias_reader(new, orig)
    alias_writer(new, orig)
  end

  def alias_writer(new, orig)
    alias_method("#{new}=", "#{orig}=") if method_defined?("#{orig}=")
  end

  def alias_reader(new, orig)
    alias_method(new, orig) if method_defined?(orig)
  end
end

Version data entries

205 entries across 205 versions & 1 rubygems

Version Path
origen-0.0.6 lib/origen/core_ext/module.rb
origen-0.0.5 lib/origen/core_ext/module.rb
origen-0.0.4 lib/origen/core_ext/module.rb
origen-0.0.3 lib/origen/core_ext/module.rb
origen-0.0.2 lib/origen/core_ext/module.rb