Class: Spread2RDF::Mapping::ColumnBlock

Inherits:
Sheet show all
Includes:
Statement
Defined in:
lib/spread2rdf/mapping/column_block.rb

Instance Attribute Summary

Attributes inherited from Sheet

#resources

Attributes inherited from Element

#parent, #schema

Instance Method Summary collapse

Methods inherited from Sheet

#cell_value, #initialize, #resource_by_index, #resource_by_row, #roo, #rows_per_resource, #worksheet

Methods inherited from Element

#_children_, #empty?, #graph, #initialize, #to_s

Constructor Details

This class inherits a constructor from Spread2RDF::Mapping::Sheet

Instance Method Details

#mapObject



9
10
11
12
13
14
15
# File 'lib/spread2rdf/mapping/column_block.rb', line 9

def map
  super
  @resources.each do |resource|
    statements_to_object(resource.subject) unless resource.empty?
  end
  self
end

#objectsObject



17
18
19
# File 'lib/spread2rdf/mapping/column_block.rb', line 17

def objects
  @resources.map(&:subject)
end