Class: R::NullCheckResult
- Inherits:
-
Object
- Object
- R::NullCheckResult
- Defined in:
- lib/R_interface/ruby_extensions.rb
Overview
Result object for nil.is__null so that nil.is__null.unboxed_get(0) => true.
Instance Method Summary collapse
-
#initialize(bool) ⇒ NullCheckResult
constructor
A new instance of NullCheckResult.
- #unboxed_get(_index = nil) ⇒ Object
-
#|(other) ⇒ Object
For (nil.is__null | x).unboxed_get(0): true | x => true; false | x => x.
Constructor Details
#initialize(bool) ⇒ NullCheckResult
Returns a new instance of NullCheckResult.
232 233 234 |
# File 'lib/R_interface/ruby_extensions.rb', line 232 def initialize(bool) @bool = bool end |
Instance Method Details
#unboxed_get(_index = nil) ⇒ Object
235 236 237 |
# File 'lib/R_interface/ruby_extensions.rb', line 235 def unboxed_get(_index = nil) @bool end |
#|(other) ⇒ Object
For (nil.is__null | x).unboxed_get(0): true | x => true; false | x => x
239 240 241 |
# File 'lib/R_interface/ruby_extensions.rb', line 239 def |(other) @bool ? self : other end |