Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use a regexp to make matching the response attr names a bit easier to…

… read.
  • Loading branch information...
commit 8321bcc1ce90fabbf98c1dc1647047e4cd981256 1 parent 93651c1
@alloy alloy authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 yard_extensions.rb
View
5 yard_extensions.rb
@@ -4,9 +4,8 @@ class ResponseAttrHandler < YARD::Handlers::Ruby::Legacy::Base
def process
statement.tokens[1..-1].each do |token|
- name = token.text.strip
- next if name.empty? || name == ','
- name = name[1..-1] if name[0,1] == ':'
+ next unless token.text =~ /^:?(\w+)/
+ name = $1
object = YARD::CodeObjects::MethodObject.new(namespace, name)
register(object)
object.dynamic = true
Please sign in to comment.
Something went wrong with that request. Please try again.