Class: RubyHeaderParser::StructDefinition

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

Overview

struct definition in header file

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:) ⇒ StructDefinition

Returns a new instance of StructDefinition.

Parameters:

  • name (String)


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

def initialize(name:)
  @name = name
end

Instance Attribute Details

#nameString

Returns:

  • (String)


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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


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

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