Sha256: bf18f9698431d21a3cf436edf1f71e6378997d5e4148473e881f6a570cd77f57

Contents?: true

Size: 721 Bytes

Versions: 6

Compression:

Stored size: 721 Bytes

Contents

require 'compositor/version'

module Compositor
end

unless "".respond_to?(:constantize)
  class String
    def constantize
      camel_cased_word = self
      unless /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ =~ camel_cased_word
        raise NameError, "#{camel_cased_word.inspect} is not a valid constant name!"
      end

      Object.module_eval("::#{$1}", __FILE__, __LINE__)
    end
  end
end

unless "".respond_to?(:underscore)
  class String
    def underscore
      self.gsub(/::/, '/').
        gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
        gsub(/([a-z\d])([A-Z])/, '\1_\2').
        tr("-", "_").
        downcase
    end
  end
end

require_relative 'compositor/base'
require_relative 'compositor/renderer/base'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
compositor-2.0.1 lib/compositor.rb
compositor-2.0.0 lib/compositor.rb
compositor-1.0.1 lib/compositor.rb
compositor-1.0.0 lib/compositor.rb
compositor-0.1.4 lib/compositor.rb
compositor-0.1.3 lib/compositor.rb