Sha256: 7b85b74ac7b9160ec77a50516de9caa0b03278cfba0f1cca366109efd5fcba3b

Contents?: true

Size: 213 Bytes

Versions: 12

Compression:

Stored size: 213 Bytes

Contents

Class.class_eval do
  def name_alias name = nil
    if name
      name.should! :be_a, String
      name.should_not_be! :blank
      @name_alias = name.to_s
    else
      @name_alias || self.name
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ruby-ext-0.2.16 lib/ruby_ext/class.rb
ruby-ext-0.2.15 lib/ruby_ext/class.rb
ruby-ext-0.2.13 lib/ruby_ext/class.rb
ruby-ext-0.2.12 lib/ruby_ext/class.rb
ruby-ext-0.2.11 lib/ruby_ext/class.rb
ruby-ext-0.2.10 lib/ruby_ext/class.rb
ruby-ext-0.2.9 lib/ruby_ext/class.rb
ruby-ext-0.2.8 lib/ruby_ext/class.rb
ruby-ext-0.2.7 lib/ruby_ext/class.rb
ruby-ext-0.2.6 lib/ruby_ext/class.rb
ruby-ext-0.2.5 lib/ruby_ext/class.rb
ruby-ext-0.2.4 lib/ruby_ext/class.rb