Sha256: 207313562b2616f2295775f1de448c780d1b790f9493d9ff08b5cadae15b1bb8

Contents?: true

Size: 404 Bytes

Versions: 26

Compression:

Stored size: 404 Bytes

Contents

require 'yaml'
require 'erb'

module Forklift
  module Base
    class Utils

      def load_yml(file)
        YAML.load(ERB.new(File.read(file)).result)
      end

      def class_name_from_file(file)
        klass = ""
        words = file.split("/").last.split(".").first.split("_")
        words.each do |word|
          klass << word.capitalize
        end
        klass
      end

    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
forklift_etl-1.2.2 lib/forklift/base/utils.rb
forklift_etl-1.2.1 lib/forklift/base/utils.rb
forklift_etl-1.2.0 lib/forklift/base/utils.rb
forklift_etl-1.1.12 lib/forklift/base/utils.rb
forklift_etl-1.1.11 lib/forklift/base/utils.rb
forklift_etl-1.1.10 lib/forklift/base/utils.rb
forklift_etl-1.1.9 lib/forklift/base/utils.rb
forklift_etl-1.1.8 lib/forklift/base/utils.rb
forklift_etl-1.1.7 lib/forklift/base/utils.rb
forklift_etl-1.1.6 lib/forklift/base/utils.rb
forklift_etl-1.1.5 lib/forklift/base/utils.rb
forklift_etl-1.1.4 lib/forklift/base/utils.rb
forklift_etl-1.1.3 lib/forklift/base/utils.rb
forklift_etl-1.1.2 lib/forklift/base/utils.rb
forklift_etl-1.1.0 lib/forklift/base/utils.rb
forklift_etl-1.0.19 lib/forklift/base/utils.rb
forklift_etl-1.0.18 lib/forklift/base/utils.rb
forklift_etl-1.0.17 lib/forklift/base/utils.rb
forklift_etl-1.0.16 lib/forklift/base/utils.rb
forklift_etl-1.0.15 lib/forklift/base/utils.rb