Module: ThorMethodHandlerMixin

Instance Method Summary collapse

Instance Method Details

#processObject



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/yard-thor.rb', line 33

def process
  super
  return if parser.extra_state[:thor_desc].nil?
  params, desc = *parser.extra_state[:thor_desc]
  @registered_object.docstring = desc
  @registered_object.signature = params
  @registered_object.namespace.groups = ["Thor Commands"]
  @registered_object.group = "Thor Commands"
  @registered_object.docstring.add_tag YARD::Tags::Tag.new(:thor_command, '')
  parser.extra_state.delete(:thor_desc)
end

#register(*objs) ⇒ Object



28
29
30
31
# File 'lib/yard-thor.rb', line 28

def register(*objs)
  @registered_object = objs.first
  super(*objs)
end