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



191
192
193
194
195
196
197
# File 'lib/rust/core/types/language.rb', line 191

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



187
188
189
# File 'lib/rust/core/types/language.rb', line 187

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