Sha256: e0c290591ca50c743f0f0f14a209666e6be9d2cda5b4c4d5452a3638ff97f180

Contents?: true

Size: 207 Bytes

Versions: 9

Compression:

Stored size: 207 Bytes

Contents

Class.class_eval do
  def alias name = nil
    if name
      name.must_be.a String
      name.must_not_be.blank
      @alias = name.to_s
    else
      @alias ||= self.name.split('::').last
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
ruby_ext-0.4.11 lib/ruby_ext/class.rb
ruby_ext-0.4.10 lib/ruby_ext/class.rb
ruby_ext-0.4.9 lib/ruby_ext/class.rb
ruby_ext-0.4.7 lib/ruby_ext/class.rb
ruby_ext-0.4.6 lib/ruby_ext/class.rb
ruby-ext-0.4.6 lib/ruby_ext/class.rb
ruby-ext-0.4.4 lib/ruby_ext/class.rb
ruby-ext-0.4.3 lib/ruby_ext/class.rb
ruby-ext-0.4.2 lib/ruby_ext/class.rb