Sha256: cd1c611ca603ee3e4ef91be0402e60a322e4fb604feda08bda3a9ef8e2cea180

Contents?: true

Size: 574 Bytes

Versions: 9

Compression:

Stored size: 574 Bytes

Contents

#
# Copyright (c) 2018 Patrick Thomas.  All rights reserved.
#

module Cayuga
  module Tools
    # Cayuga Tools Symbol
    module Symbol
      def stringify
        to_s
      end

      def symbolize
        self
      end

      def classify
        klass = Object.const_get(self.to_s)
        raise(NameError,"wrong class name '#{klass}'") unless klass.kind_of?(Class)
        klass
      end

      def filenamify(extension=nil)
        stringify.filenamify(extension)
      end

    end
  end
end

Symbol.include(Cayuga::Tools::Symbol)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cayuga-0.0.10 lib/cayuga/tools/symbol.rb
cayuga-0.0.9 lib/cayuga/tools/symbol.rb
cayuga-0.0.8 lib/cayuga/tools/symbol.rb
cayuga-0.0.7 lib/cayuga/tools/symbol.rb
cayuga-0.0.6 lib/cayuga/tools/symbol.rb
cayuga-0.0.5 lib/cayuga/tools/symbol.rb
cayuga-0.0.4 lib/cayuga/tools/symbol.rb
cayuga-0.0.3 lib/cayuga/tools/symbol.rb
cayuga-0.0.2 lib/cayuga/tools/symbol.rb