Class: Mattock::YARDExtensions::DefineHandler

Inherits:
YARD::Handlers::Ruby::Base
  • Object
show all
Defined in:
lib/calibrate/yard-extensions.rb

Instance Method Summary collapse

Instance Method Details

#mattock_defining?(obj, method) ⇒ Boolean

Returns:

  • (Boolean)


18
# File 'lib/calibrate/yard-extensions.rb', line 18

d

#processObject



28
29
30
31
32
# File 'lib/calibrate/yard-extensions.rb', line 28

def process
  return unless mattock_defining?(namespace, statement[0][0])
  (root[:tasklibs] ||= []) << namespace
  namespace[:task_definition] = statement[2]
end

#rootObject



20
21
22
23
24
25
26
# File 'lib/calibrate/yard-extensions.rb', line 20

def root
  ns = namespace
  until ns.root?
    ns = ns.namespace
  end
  ns
end