Sha256: 6312f95d2c4b899ef165add1619082086a067ef7d491bbc1a3698d947faa3184

Contents?: true

Size: 825 Bytes

Versions: 6

Compression:

Stored size: 825 Bytes

Contents

require "objc2swift_assistant/version"

require "objc2swift_assistant/code_recognizer"

module Objc2swiftAssistant

  class ImplementationRecognizer < CodeRecognizer
    def initialize( )
      super( /^\s*@implementation/, ImplementationRegion, :implementation, true )
    end
  end


  class ImplementationRegion < ClassRootRegion

    def initialize(starting_line_number, is_root_entity )
      super(starting_line_number, is_root_entity, CLASS_IMPLEMENTATION_KEY )
    end

    def extract_information( file_slice )
      class_name_match = /^\s*(@implementation)\s+(?<class_name>\w*)/.match(file_slice[0])
      unless class_name_match.nil?
        @class_name = class_name_match["class_name"]
      else
        @configuation.log_warning( "Could not match class name in #{file_slice[0]}" )
      end
    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
objc2swift_assistant-0.3.6 lib/objc2swift_assistant/recognizers/implementation_recognizer.rb
objc2swift_assistant-0.3.4 lib/objc2swift_assistant/recognizers/implementation_recognizer.rb
objc2swift_assistant-0.3.3 lib/objc2swift_assistant/recognizers/implementation_recognizer.rb
objc2swift_assistant-0.3.2 lib/objc2swift_assistant/recognizers/implementation_recognizer.rb
objc2swift_assistant-0.3.1 lib/objc2swift_assistant/recognizers/implementation_recognizer.rb
objc2swift_assistant-0.3.0 lib/objc2swift_assistant/recognizers/implementation_recognizer.rb