Sha256: 5764ad31918760c145a909cd7267d01f43051340f626d382d30c9fc7f38fdac8

Contents?: true

Size: 548 Bytes

Versions: 5

Compression:

Stored size: 548 Bytes

Contents

module Cxxproject
  module Context
    
    def check_hash(hash,allowed)
      hash.keys.map do |k|
        error_string = ["error while evaluating \"#{@current_working_dir}/#{@current_project_file}\"",
                        "\"#{k}\" is not a valid specifier!",
                        "allowd specifiers: #{allowed}"].join($/)
        raise error_string unless allowed.include?(k)
      end
    end

    def get_as_array(hash, s)
      res = hash[s]
      if res.is_a?(Array)
        return res
      end
      return [res]
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cxxproject-0.6.9 lib/cxxproject/context.rb
cxxproject-0.6.6 lib/cxxproject/context.rb
cxxproject-0.6.5 lib/cxxproject/context.rb
cxxproject-0.6.4 lib/cxxproject/context.rb
cxxproject-0.6.2 lib/cxxproject/context.rb