Sha256: 95cfabcdca180f203e7a62ff8933391d77963272748c3513e4ad453c888deb96

Contents?: true

Size: 277 Bytes

Versions: 1

Compression:

Stored size: 277 Bytes

Contents

class Module
  def attr_alias(new_attr, original)
    alias_method(new_attr, original) if method_defined?(original)
    new_writer = "#{new_attr}="
    original_writer = "#{original}="
    alias_method(new_writer, original_writer) if method_defined?(original_writer)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eeml-0.0.36 lib/eeml/attr_alias.rb