Sha256: 7ef31301ba34ebef2a44b526caa8369dbaed0243c7e95e2585fce605c55dca13

Contents?: true

Size: 245 Bytes

Versions: 70

Compression:

Stored size: 245 Bytes

Contents

class String
  def demodulize
    if i = self.rindex("::")
      self[(i + 2)..-1]
    else
      self
    end
  end

  def deconstantize
    self[0, self.rindex("::") || 0] # implementation based on the one in facets' Module#spacename
  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
isomorfeus-react-16.12.4 lib/react/active_support_support.rb
isomorfeus-react-16.12.3 lib/react/active_support_support.rb
isomorfeus-react-16.12.2 lib/react/active_support_support.rb
isomorfeus-react-16.12.1 lib/react/active_support_support.rb
isomorfeus-react-16.12.0 lib/react/active_support_support.rb
isomorfeus-react-16.11.4 lib/react/active_support_support.rb
isomorfeus-react-16.11.3 lib/react/active_support_support.rb
isomorfeus-react-16.11.2 lib/react/active_support_support.rb
isomorfeus-react-16.11.1 lib/react/active_support_support.rb
isomorfeus-react-16.11.0 lib/react/active_support_support.rb
isomorfeus-react-16.10.17 lib/react/active_support_support.rb
isomorfeus-react-16.10.16 lib/react/active_support_support.rb
isomorfeus-react-16.10.14 lib/react/active_support_support.rb
isomorfeus-react-16.10.13 lib/react/active_support_support.rb
isomorfeus-react-16.10.12 lib/react/active_support_support.rb
isomorfeus-react-16.10.11 lib/react/active_support_support.rb
isomorfeus-react-16.10.10 lib/react/active_support_support.rb
isomorfeus-react-16.10.9 lib/react/active_support_support.rb
isomorfeus-react-16.10.8 lib/react/active_support_support.rb
isomorfeus-react-16.10.7 lib/react/active_support_support.rb