Sha256: b351e38da1af1ecf832c74415a90026cb4de8d042ad0f2959f65d27401f28833

Contents?: true

Size: 222 Bytes

Versions: 46

Compression:

Stored size: 222 Bytes

Contents

module Tracksperanto::ConstName
  module C
    def const_name
      to_s.split('::').pop
    end
  end
  
  def const_name
    self.class.const_name
  end
  
  def self.included(into)
    into.extend(C)
    super
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
tracksperanto-2.1.1 lib/tracksperanto/const_name.rb
tracksperanto-2.1.0 lib/tracksperanto/const_name.rb
tracksperanto-2.0.2 lib/tracksperanto/const_name.rb
tracksperanto-2.0.1 lib/tracksperanto/const_name.rb
tracksperanto-2.0.0 lib/tracksperanto/const_name.rb
tracksperanto-1.9.9 lib/tracksperanto/const_name.rb
tracksperanto-1.9.8 lib/tracksperanto/const_name.rb
tracksperanto-1.9.6 lib/tracksperanto/const_name.rb
tracksperanto-1.9.5 lib/tracksperanto/const_name.rb
tracksperanto-1.9.4 lib/tracksperanto/const_name.rb
tracksperanto-1.9.3 lib/tracksperanto/const_name.rb
tracksperanto-1.9.2 lib/tracksperanto/const_name.rb
tracksperanto-1.9.1 lib/tracksperanto/const_name.rb
tracksperanto-1.9.0 lib/tracksperanto/const_name.rb
tracksperanto-1.8.4 lib/tracksperanto/const_name.rb
tracksperanto-1.8.2 lib/tracksperanto/const_name.rb
tracksperanto-1.8.1 lib/tracksperanto/const_name.rb
tracksperanto-1.8.0 lib/tracksperanto/const_name.rb
tracksperanto-1.7.5 lib/tracksperanto/const_name.rb
tracksperanto-1.7.4 lib/tracksperanto/const_name.rb