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



120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/utilrb/yard.rb', line 120

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