Sha256: 0e88d6e56cb18d12bb40cebc6ac1d2e2a3023aabd76102abc25c827b91a7493f
Contents?: true
Size: 632 Bytes
Versions: 1
Compression:
Stored size: 632 Bytes
Contents
module Spread2RDF class Spreadsheet class MappingDSL def initialize(schema) @schema = schema end def namespaces(namespaces) namespaces.each { |name, namespace| Namespace[name] = namespace } end def worksheet(name, options={}, &block) source_name = options[:source_name] = name name = ( options.delete(:name) || source_name ).to_sym worksheet = @schema.worksheet[name] ||= Worksheet.new(@schema) worksheet.update_attributes options.merge(name: name, source_name: source_name) Sheet::DSL.new(worksheet, &block) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spread2rdf-0.0.1pre.1 | lib/spread2rdf/spreadsheet/mapping_dsl.rb |