Class: Renjin::Logical
- Defined in:
- lib/JRubyR/logical_value.rb
Instance Attribute Summary
Attributes inherited from Vector
Attributes included from RBSexp
Instance Method Summary collapse
-
#each(&block) ⇒ Object
—————————————————————————————-.
-
#to_string ⇒ Object
—————————————————————————————- Renjin bug? toString of a LogicalVector in Renjin is returing a LogicalVector and not a string.
Methods inherited from Vector
#!, #!=, #%, #&, #*, #**, #+, #+@, #-, #-@, #/, #<, #<=, #==, #>, #>=, #as__character, #as__complex, #as__double, #as__integer, #as__mdarray, #atomic?, #character?, #coerce, #complex?, #double?, #eq, #get, #gt, #gz, #initialize, #int_div, #integer?, #l_and, #l_or, #logical?, #numeric?, #xor, #|
Methods included from Index
#[], #[]=, #length, #method_missing, #parse
Methods inherited from RubySexp
Methods included from RBSexp
#destroy, #ncol, #nrow, #pp, #print, #r, #rclass, #sexp?, #typeof, #unbind
Constructor Details
This class inherits a constructor from Renjin::Vector
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Renjin::Index
Instance Method Details
#each(&block) ⇒ Object
38 39 40 41 42 |
# File 'lib/JRubyR/logical_value.rb', line 38 def each(&block) while (@iterator.hasNext()) block.call((@iterator.next().getInternalValue() == 1)? true : false) end end |
#to_string ⇒ Object
Renjin bug? toString of a LogicalVector in Renjin is returing a LogicalVector and not a string. Need to take care of this here. to_a converts an Enumerable to an array
50 51 52 |
# File 'lib/JRubyR/logical_value.rb', line 50 def to_string to_a.join(",") end |