Sha256: 9dbf5e66b89d710833e5667fb2593f6623b8be008d333c43496d2b0d9d1ed9d6
Contents?: true
Size: 585 Bytes
Versions: 28
Compression:
Stored size: 585 Bytes
Contents
module ArgumentDescription class ArgumentDescription < Treetop::Runtime::SyntaxNode def name first.argument_name.name.text_value end def types if first.arg_types.empty? [] else args = first.arg_types.elements.last [args.argument_type.text_value].concat(args.more.elements.map{ |e| e.argument_type.text_value }) end end def description more_lines = more.elements.map{ |l| l.to_s.strip }.reject { |l| l.empty? } [first.description.text_value.strip].concat(more_lines).join(" ") end end end
Version data entries
28 entries across 28 versions & 2 rubygems