Class: YARD::Handlers::Watir::AttributesHandler

Inherits:
Ruby::Base
  • Object
show all
Defined in:
lib/yard/handlers/watir.rb

Constant Summary collapse

TYPES =
{
  :string => "String",
  :bool => "Boolean",
  :int => "Integer"
}

Instance Method Summary collapse

Instance Method Details

#processObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/yard/handlers/watir.rb', line 19

def process
  attributes = try_eval

  if attributes.nil?
    p :ignoring => statement.source, :in => namespace.to_s
    return
  end

  TYPES.each do |type, return_type|
    if attributes.member? type
      create_attributes attributes[type], return_type
    end
  end
end