Class: Partials::FunctionDefinition

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

Overview

Data class representing a C function with intentionally duplicated fields

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, signature: nil, code_block: nil, source_filepath: nil, line_num: nil) ⇒ FunctionDefinition

Constructor to set unassigned fields to nil for convenience



59
60
61
# File 'lib/ceedling/partials/partials.rb', line 59

def initialize(name: nil, signature: nil, code_block: nil, source_filepath: nil, line_num: nil)
  super
end

Instance Attribute Details

#code_blockObject

Returns the value of attribute code_block

Returns:

  • (Object)

    the current value of code_block



50
51
52
# File 'lib/ceedling/partials/partials.rb', line 50

def code_block
  @code_block
end

#line_numObject

Returns the value of attribute line_num

Returns:

  • (Object)

    the current value of line_num



50
51
52
# File 'lib/ceedling/partials/partials.rb', line 50

def line_num
  @line_num
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



50
51
52
# File 'lib/ceedling/partials/partials.rb', line 50

def name
  @name
end

#signatureObject

Returns the value of attribute signature

Returns:

  • (Object)

    the current value of signature



50
51
52
# File 'lib/ceedling/partials/partials.rb', line 50

def signature
  @signature
end

#source_filepathObject

Returns the value of attribute source_filepath

Returns:

  • (Object)

    the current value of source_filepath



50
51
52
# File 'lib/ceedling/partials/partials.rb', line 50

def source_filepath
  @source_filepath
end