Method: YARD::Handlers::Ruby::AttributeHandler#validated_attribute_names
- Defined in:
- lib/yard/handlers/ruby/attribute_handler.rb
permalink #validated_attribute_names(params) ⇒ Array<String> (protected)
Strips out any non-essential arguments from the attr statement.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/yard/handlers/ruby/attribute_handler.rb', line 70 def validated_attribute_names(params) params.map do |obj| case obj.type when :symbol_literal obj.jump(:ident, :op, :kw, :const).source when :string_literal obj.jump(:string_content).source else raise YARD::Parser::UndocumentableError, obj.source end end end |