Class: Rust::Options

Inherits:
Hash show all
Defined in:
lib/rust/core/types/language.rb

Overview

Represents the options of a function in R. Works as a Hash associating option names to objects.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



207
208
209
210
211
212
213
# File 'lib/rust/core/types/language.rb', line 207

def self.from_hash(hash)
    options = Options.new
    hash.each do |key, value|
        options[key.to_s] = value
    end
    return options
end

Instance Method Details

#to_RObject



203
204
205
# File 'lib/rust/core/types/language.rb', line 203

def to_R
    return self.map { |k, v| "#{k}=#{v.to_R}" }.join(", ")
end