Class: ExternalFunction

Inherits:
Struct
  • Object
show all
Defined in:
lib/dentaku/external_function.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeExternalFunction

Returns a new instance of ExternalFunction.



2
3
4
5
# File 'lib/dentaku/external_function.rb', line 2

def initialize(*)
  super
  self.name = self.name.to_s
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



1
2
3
# File 'lib/dentaku/external_function.rb', line 1

def body
  @body
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



1
2
3
# File 'lib/dentaku/external_function.rb', line 1

def name
  @name
end

#signatureObject

Returns the value of attribute signature

Returns:

  • (Object)

    the current value of signature



1
2
3
# File 'lib/dentaku/external_function.rb', line 1

def signature
  @signature
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



1
2
3
# File 'lib/dentaku/external_function.rb', line 1

def type
  @type
end

Instance Method Details

#tokensObject



7
8
9
# File 'lib/dentaku/external_function.rb', line 7

def tokens
  signature.flat_map { |t| [t, :comma] }[0...-1]
end