Class: Utilrb::YARD::AttrEnumerableHandler

Inherits:
YARD::Handlers::Ruby::AttributeHandler
  • Object
show all
Defined in:
lib/utilrb/yard.rb

Instance Method Summary collapse

Instance Method Details

#processObject


9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/utilrb/yard.rb', line 9

def process
    name = statement.parameters.first.jump(:tstring_content, :ident).source

    object = YARD::CodeObjects::MethodObject.new(namespace, name, scope)
    object.dynamic = true 
    register(object)
    object = YARD::CodeObjects::MethodObject.new(namespace, "#{name}=", scope)
    object.dynamic = true 
    register(object)
    object = YARD::CodeObjects::MethodObject.new(namespace, "each_#{name}", scope)
    object.dynamic = true 
    register(object)
end