Class: SFRP::Input::Set

Inherits:
Object
  • Object
show all
Defined in:
lib/sfrp/input/set.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Set

Returns a new instance of Set.



8
9
10
11
# File 'lib/sfrp/input/set.rb', line 8

def initialize(&block)
  @source_file_h = {}
  block.call(self) if block
end

Instance Method Details

#append_source_file(fmodule_uri, content) ⇒ Object

Append a source file and return missing source file names.



24
25
26
# File 'lib/sfrp/input/set.rb', line 24

def append_source_file(fmodule_uri, content)
  @source_file_h[fmodule_uri] = SourceFile.new(fmodule_uri, content)
end

#to_rawObject



13
14
15
16
17
18
19
20
21
# File 'lib/sfrp/input/set.rb', line 13

def to_raw
  Raw::Set.new do |dest_set|
    @source_file_h.values.each do |source_file|
      Parser.parse(source_file).each do |element|
        dest_set << element
      end
    end
  end
end