class Rust::Function
Attributes
arguments[R]
name[R]
options[R]
Public Class Methods
new(name)
click to toggle source
# File lib/rust-calls.rb, line 9 def initialize(name) @function = name @arguments = Arguments.new @options = Options.new end
Public Instance Methods
arguments=(arguments)
click to toggle source
# File lib/rust-calls.rb, line 21 def arguments=(arguments) raise TypeError, "Expected Arguments" unless options.is_a?(Arguments) @arguments = arguments end
call()
click to toggle source
# File lib/rust-calls.rb, line 32 def call Rust._eval(self.to_R) end
options=(options)
click to toggle source
# File lib/rust-calls.rb, line 15 def options=(options) raise TypeError, "Expected Options" unless options.is_a?(Options) @options = options end
to_R()
click to toggle source
# File lib/rust-calls.rb, line 27 def to_R params = [@arguments.to_R, @options.to_R].select { |v| v != "" }.join(",") return "#@function(#{params})" end