Class: RubyHeaderParser::TypeDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_header_parser/type_definition.rb

Overview

type definition in header file

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:) ⇒ TypeDefinition

Returns a new instance of TypeDefinition.

Parameters:

  • name (String)


11
12
13
# File 'lib/ruby_header_parser/type_definition.rb', line 11

def initialize(name:)
  @name = name
end

Instance Attribute Details

#nameString

Returns:

  • (String)


8
9
10
# File 'lib/ruby_header_parser/type_definition.rb', line 8

def name
  @name
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


17
18
19
# File 'lib/ruby_header_parser/type_definition.rb', line 17

def ==(other)
  other.is_a?(TypeDefinition) && name == other.name
end