Sha256: a8c912c0256c2e072091efeb6c25c4f225c4ba6fa4d26c0c7972031d87c02424

Contents?: true

Size: 442 Bytes

Versions: 2

Compression:

Stored size: 442 Bytes

Contents

# encoding: UTF-8

# Global requires
require 'multi_json'

# Local requires
require 'gooddata/models/models'

module GoodData::Helpers
  module BlueprintHelper
    def blueprint_from_file(bp)
      # Try to load as full path
      raw = IO.read(bp)

      # TODO: Try to load as relative path if failed

      parsed = MultiJson.load(raw, :symbolize_keys => true)
      return GoodData::Model::ProjectBlueprint.new(parsed)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gooddata-0.6.20 spec/helpers/blueprint_helper.rb
gooddata-0.6.19 spec/helpers/blueprint_helper.rb