Class: YARD::Amp::ModernOptionHandler
Instance Method Summary
collapse
#attach_metadata
#clean_string, #construct_docstring, #parse_hash, #split_by_comma_smart
Instance Method Details
#parse_parameters(params) ⇒ Object
97
98
99
100
101
102
103
104
105
106
|
# File 'lib/yard-amp/modern_handler.rb', line 97
def parse_parameters(params)
name = clean_string(params.first.source)
description = clean_string(params[1].source)
option = OptionObject.new(owner, name, description)
if params[2]
option.options = parse_hash(params[2])
end
option.docstring = statement.
option
end
|
#process ⇒ Object
89
90
91
92
93
94
95
|
# File 'lib/yard-amp/modern_handler.rb', line 89
def process
return unless super
params = statement.parameters
option = parse_parameters(params)
owner[:amp_data][:options] ||= []
owner[:amp_data][:options] << option
end
|