Class: KafoParsers::ParamDocParser

Inherits:
Object
  • Object
show all
Defined in:
lib/kafo_parsers/param_doc_parser.rb

Constant Summary collapse

ATTRIBUTE_LINE =
/^(condition|group|type)\s*:\s*(.*)/

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(param, text) ⇒ ParamDocParser

Returns a new instance of ParamDocParser.



7
8
9
10
11
# File 'lib/kafo_parsers/param_doc_parser.rb', line 7

def initialize(param, text)
  @param = param
  @metadata = {}
  parse_paragraph([text].flatten)
end

Instance Attribute Details

#docObject (readonly)

Returns the value of attribute doc.



13
14
15
# File 'lib/kafo_parsers/param_doc_parser.rb', line 13

def doc
  @doc
end

#paramObject (readonly)

Returns the value of attribute param.



13
14
15
# File 'lib/kafo_parsers/param_doc_parser.rb', line 13

def param
  @param
end