Class: R::Environment
- Includes:
- IndexedObject
- Defined in:
- lib/R_interface/renvironment.rb
Overview
Constant Summary
Constants inherited from Object
Instance Attribute Summary
Attributes inherited from Object
Instance Method Summary collapse
- #class ⇒ Object
-
#get(key) ⇒ Object
--------------------------------------------------------------------------------------.
-
#method_missing(symbol, *args, &block) ⇒ Object
--------------------------------------------------------------------------------------.
-
#set(key, value) ⇒ Object
--------------------------------------------------------------------------------------.
Methods included from IndexedObject
Methods inherited from Object
#==, build, build_class_probe_count, build_from_r_class_string, build_from_wrapper_tag, #call, class_probe_fetch_r_class, increment_build_class_probe_count!, #initialize, #inspect, #instance_of?, #instance_variable_get, #instance_variable_set, #is_a?, #nil?, #pretty_print, #rclass, reset_build_counters!, #respond_to?, #send, #to_ary, #to_i, #to_ruby, #to_s, #typeof, #unboxed_get
Methods included from ExecUniOp
Methods included from UnaryOperators
Methods included from ExecBinOp
Methods included from BinaryOperators
#!=, #%, #*, #**, #+, #-, #/, #<, #<=, #>, #>=, #_, #eq, #int_div, #til
Constructor Details
This class inherits a constructor from R::Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args, &block) ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/R_interface/renvironment.rb', line 57 def method_missing(symbol, *args, &block) name = ::R::Support.convert_symbol2r(symbol) case when name =~ /(.*)=$/ set($1, args[0]) when name == "env_names" # Call R's env_names(env) from Environment so .length is vector length (1), not string length. ::R::Support.exec_function("env_names", self, unbox: false) else super(symbol, *args, &block) end end |
Instance Method Details
#class ⇒ Object
33 34 35 |
# File 'lib/R_interface/renvironment.rb', line 33 def class ::R::Environment end |