Sha256: 895730391d7441d0687df15fd7d46dad62ece5ce20271e7984741e77faf1a819

Contents?: true

Size: 440 Bytes

Versions: 3

Compression:

Stored size: 440 Bytes

Contents

module SketchUpYARD
  class ClassEnumConstantHandler < YARD::Handlers::C::Base

    MATCH = %r{\bDEFINE_RUBY_CLASS_ENUM\s*\(([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
    handles MATCH
    statement_class BodyStatement

    process do
      statement.source.scan(MATCH) do |klass_name, const_name|
        type = "const"
        value = "nil"
        handle_constants(type, klass_name, const_name, value)
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yard-sketchup-1.1.3 lib/yard-sketchup/yard/handlers/class_enum_constants.rb
yard-sketchup-1.0.2 lib/yard-sketchup/yard/handlers/class_enum_constants.rb
yard-sketchup-1.0.1 lib/yard-sketchup/yard/handlers/class_enum_constants.rb