Class: CodeModels::Properties::Parser

Inherits:
CodeModels::Parser
  • Object
show all
Defined in:
lib/codemodels/properties/parser.rb

Instance Method Summary collapse

Instance Method Details

#internal_parse_artifact(artifact) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/codemodels/properties/parser.rb', line 8

def internal_parse_artifact(artifact)
    code = artifact.code
    node = PropertiesFile.new
    artifact.code.lines.map(&:chomp).each do |l|
        name,value = l.split(':')
        child_node = Property.new
        child_node.name = name
        child_node.value = value
        node.addProperties(child_node)
    end
    node
end