Class: CExtractorTypes::CFunctionDefinition

Inherits:
Struct
  • Object
show all
Defined in:
lib/ceedling/c_extractor/c_extractor_types.rb

Overview

Data class representing an extracted C function definition

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, signature: nil, body: nil, code_block: nil, line_count: 0, source_filepath: nil, line_num: nil, decorators: [], signature_stripped: nil) ⇒ CFunctionDefinition

Constructor to set unassigned fields to nil for convenience



90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 90

def initialize(
  name: nil,
  signature: nil,
  body: nil,
  code_block: nil,
  line_count: 0,
  source_filepath: nil,
  line_num: nil,
  decorators: [],
  signature_stripped: nil
  )
  super
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def body
  @body
end

#code_blockObject

Returns the value of attribute code_block

Returns:

  • (Object)

    the current value of code_block



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def code_block
  @code_block
end

#decoratorsObject

Returns the value of attribute decorators

Returns:

  • (Object)

    the current value of decorators



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def decorators
  @decorators
end

#line_countObject

Returns the value of attribute line_count

Returns:

  • (Object)

    the current value of line_count



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def line_count
  @line_count
end

#line_numObject

Returns the value of attribute line_num

Returns:

  • (Object)

    the current value of line_num



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def line_num
  @line_num
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def name
  @name
end

#signatureObject

Returns the value of attribute signature

Returns:

  • (Object)

    the current value of signature



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def signature
  @signature
end

#signature_strippedObject

Returns the value of attribute signature_stripped

Returns:

  • (Object)

    the current value of signature_stripped



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def signature_stripped
  @signature_stripped
end

#source_filepathObject

Returns the value of attribute source_filepath

Returns:

  • (Object)

    the current value of source_filepath



77
78
79
# File 'lib/ceedling/c_extractor/c_extractor_types.rb', line 77

def source_filepath
  @source_filepath
end