Class: Stepmod::Utils::Concept

Inherits:
Object
  • Object
show all
Defined in:
lib/stepmod/utils/concept.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Concept

Returns a new instance of Concept.



7
8
9
10
11
# File 'lib/stepmod/utils/concept.rb', line 7

def initialize(options)
  options.each_pair do |k, v|
    send("#{k}=", v)
  end
end

Class Method Details

.parse(definition_xml, reference_anchor:, reference_clause:) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/stepmod/utils/concept.rb', line 13

def self.parse(definition_xml, reference_anchor:, reference_clause:)
  new(
    converted_definition: Stepmod::Utils::StepmodDefinitionConverter.convert(definition_xml),
    reference_anchor: reference_anchor,
    reference_clause: reference_clause
  )
end

Instance Method Details

#to_mn_adocObject



21
22
23
24
25
26
27
28
# File 'lib/stepmod/utils/concept.rb', line 21

def to_mn_adoc
  "    \#{converted_definition}\n\n    [.source]\n    <<\#{reference_anchor},clause=\#{reference_clause}>>\n  TEXT\nend\n"