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-1.7.3 lib/tracksperanto/const_name.rb
tracksperanto-1.7.2 lib/tracksperanto/const_name.rb
tracksperanto-1.7.1 lib/tracksperanto/const_name.rb
tracksperanto-1.7.0 lib/tracksperanto/const_name.rb
tracksperanto-1.6.9 lib/tracksperanto/const_name.rb
tracksperanto-1.6.8 lib/tracksperanto/const_name.rb
tracksperanto-1.6.7 lib/tracksperanto/const_name.rb
tracksperanto-1.6.6 lib/tracksperanto/const_name.rb
tracksperanto-1.6.5 lib/tracksperanto/const_name.rb
tracksperanto-1.6.4 lib/tracksperanto/const_name.rb
tracksperanto-1.6.3 lib/tracksperanto/const_name.rb
tracksperanto-1.6.2 lib/tracksperanto/const_name.rb
tracksperanto-1.6.1 lib/tracksperanto/const_name.rb
tracksperanto-1.6.0 lib/tracksperanto/const_name.rb
tracksperanto-1.5.7 lib/tracksperanto/const_name.rb
tracksperanto-1.5.6 lib/tracksperanto/const_name.rb
tracksperanto-1.5.5 lib/tracksperanto/const_name.rb
tracksperanto-1.5.4 lib/tracksperanto/const_name.rb
tracksperanto-1.5.3 lib/tracksperanto/const_name.rb
tracksperanto-1.5.2 lib/tracksperanto/const_name.rb