Class: RubyHeaderParser::FunctionDefinition

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

Overview

function definition in header file

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, definition:, typeref:, args:) ⇒ FunctionDefinition

Returns a new instance of FunctionDefinition.

Parameters:



26
27
28
29
30
31
# File 'lib/ruby_header_parser/function_definition.rb', line 26

def initialize(name:, definition:, typeref:, args:)
  @name = name
  @definition = definition
  @typeref = typeref
  @args = args
end

Instance Attribute Details

#argsArray<ArgumentDefinition>

Returns:



20
21
22
# File 'lib/ruby_header_parser/function_definition.rb', line 20

def args
  @args
end

#definitionString

Returns:

  • (String)


12
13
14
# File 'lib/ruby_header_parser/function_definition.rb', line 12

def definition
  @definition
end

#nameString

Returns:

  • (String)


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

def name
  @name
end

#typerefTyperefDefinition

Returns:



16
17
18
# File 'lib/ruby_header_parser/function_definition.rb', line 16

def typeref
  @typeref
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


35
36
37
38
# File 'lib/ruby_header_parser/function_definition.rb', line 35

def ==(other)
  other.is_a?(FunctionDefinition) && name == other.name && definition == other.definition &&
    typeref == other.typeref && args == other.args
end