Class: ExternalFunction
- Inherits:
-
Struct
- Object
- Struct
- ExternalFunction
- Defined in:
- lib/dentaku/external_function.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#name ⇒ Object
Returns the value of attribute name.
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize ⇒ ExternalFunction
constructor
A new instance of ExternalFunction.
- #tokens ⇒ Object
Constructor Details
#initialize ⇒ ExternalFunction
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
#body ⇒ Object
Returns the value of attribute body
1 2 3 |
# File 'lib/dentaku/external_function.rb', line 1 def body @body end |
#name ⇒ Object
Returns the value of attribute name
1 2 3 |
# File 'lib/dentaku/external_function.rb', line 1 def name @name end |
#signature ⇒ Object
Returns the value of attribute signature
1 2 3 |
# File 'lib/dentaku/external_function.rb', line 1 def signature @signature end |
#type ⇒ Object
Returns the value of attribute type
1 2 3 |
# File 'lib/dentaku/external_function.rb', line 1 def type @type end |
Instance Method Details
#tokens ⇒ Object
7 8 9 |
# File 'lib/dentaku/external_function.rb', line 7 def tokens signature.flat_map { |t| [t, :comma] }[0...-1] end |