Class: SFRP::Input::Set
- Inherits:
-
Object
- Object
- SFRP::Input::Set
- Defined in:
- lib/sfrp/input/set.rb
Instance Method Summary collapse
-
#append_source_file(fmodule_uri, content) ⇒ Object
Append a source file and return missing source file names.
-
#initialize(&block) ⇒ Set
constructor
A new instance of Set.
- #to_raw ⇒ Object
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_raw ⇒ Object
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 |