Class: Rust::Function
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name) ⇒ Function
constructor
A new instance of Function.
- #to_R ⇒ Object
Constructor Details
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
95 96 97 |
# File 'lib/rust/core/types/language.rb', line 95 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
94 95 96 |
# File 'lib/rust/core/types/language.rb', line 94 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
96 97 98 |
# File 'lib/rust/core/types/language.rb', line 96 def @options end |
Instance Method Details
#call ⇒ Object
121 122 123 |
# File 'lib/rust/core/types/language.rb', line 121 def call Rust._eval(self.to_R) end |
#to_R ⇒ Object
116 117 118 119 |
# File 'lib/rust/core/types/language.rb', line 116 def to_R params = [@arguments.to_R, @options.to_R].select { |v| v != "" }.join(",") return "#@function(#{params})" end |