Class: CSVPlusPlus::Language::Entities::FunctionCall

Inherits:
EntityWithArguments show all
Defined in:
lib/csv_plus_plus/language/entities/function_call.rb

Overview

A function call

Instance Attribute Summary

Attributes inherited from EntityWithArguments

#arguments

Attributes inherited from Entity

#id, #type

Instance Method Summary collapse

Methods inherited from Entity

#method_missing, #respond_to_missing?

Constructor Details

#initialize(id, arguments) ⇒ FunctionCall

initialize



9
10
11
# File 'lib/csv_plus_plus/language/entities/function_call.rb', line 9

def initialize(id, arguments)
  super(:function_call, id:, arguments:)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CSVPlusPlus::Language::Entities::Entity

Instance Method Details

#==(other) ⇒ Object



19
20
21
# File 'lib/csv_plus_plus/language/entities/function_call.rb', line 19

def ==(other)
  super && @id == other.id
end

#to_sObject

to_s



14
15
16
# File 'lib/csv_plus_plus/language/entities/function_call.rb', line 14

def to_s
  "#{@id.to_s.upcase}(#{arguments_to_s})"
end