Sha256: 6d4745a97577b997c1c534acd52509ece8d33078fa77362347cc3b0cb03889fd

Contents?: true

Size: 413 Bytes

Versions: 4

Compression:

Stored size: 413 Bytes

Contents

require 'malt/core_ext'

module Malt

  module Kernel
    private

    #
    def make_ostruct(hash)
      case hash
      when OpenStruct
        hash
      else
        OpenStruct.new(hash)
      end
    end

    #
    def ext_to_type(ext)
      ext = ext.to_s.downcase
      return nil if ext.empty?
      if ext[0,1] == '.'
        ext[1..-1].to_sym
      else
        ext.to_sym
      end
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
malt-0.3.0 lib/malt/kernel.rb
malt-0.2.0 lib/malt/kernel.rb
malt-0.1.1 lib/malt/kernel.rb
malt-0.1.0 lib/malt/kernel.rb