Class: Nydp::Nil
- Includes:
- Enumerable, Singleton
- Defined in:
- lib/nydp/truth.rb
Instance Method Summary collapse
- #&(other) ⇒ Object
- #+(other) ⇒ Object
- #_nydp_get(a) ⇒ Object
- #_nydp_set(a, v) ⇒ Object
- #assign(*_) ⇒ Object
- #car ⇒ Object
- #cdr ⇒ Object
- #copy ⇒ Object
-
#each ⇒ Object
nil behaves like an empty list.
- #execute(vm) ⇒ Object
- #init_with ⇒ Object
- #inspect ⇒ Object
- #is?(other) ⇒ Boolean
- #isnt?(other) ⇒ Boolean
- #nydp_type ⇒ Object
- #size ⇒ Object
- #to_ruby ⇒ Object
- #to_s ⇒ Object
- #|(other) ⇒ Object
Instance Method Details
#&(other) ⇒ Object
35 |
# File 'lib/nydp/truth.rb', line 35 def & other ; self ; end |
#+(other) ⇒ Object
25 |
# File 'lib/nydp/truth.rb', line 25 def + other ; other ; end |
#_nydp_set(a, v) ⇒ Object
33 |
# File 'lib/nydp/truth.rb', line 33 def _nydp_set a, v ; Nydp::NIL ; end |
#assign(*_) ⇒ Object
27 |
# File 'lib/nydp/truth.rb', line 27 def assign *_ ; self ; end |
#car ⇒ Object
19 |
# File 'lib/nydp/truth.rb', line 19 def car ; self ; end |
#cdr ⇒ Object
20 |
# File 'lib/nydp/truth.rb', line 20 def cdr ; self ; end |
#copy ⇒ Object
26 |
# File 'lib/nydp/truth.rb', line 26 def copy ; self ; end |
#each ⇒ Object
nil behaves like an empty list
34 |
# File 'lib/nydp/truth.rb', line 34 def each ; ; end |
#execute(vm) ⇒ Object
31 |
# File 'lib/nydp/truth.rb', line 31 def execute vm ; vm.push_arg self ; end |
#inspect ⇒ Object
28 |
# File 'lib/nydp/truth.rb', line 28 def inspect ; "nil" ; end |
#is?(other) ⇒ Boolean
22 |
# File 'lib/nydp/truth.rb', line 22 def is? other ; self.equal? other ; end |
#isnt?(other) ⇒ Boolean
23 |
# File 'lib/nydp/truth.rb', line 23 def isnt? other ; !self.equal? other ; end |
#nydp_type ⇒ Object
29 |
# File 'lib/nydp/truth.rb', line 29 def nydp_type ; :nil ; end |
#size ⇒ Object
21 |
# File 'lib/nydp/truth.rb', line 21 def size ; 0 ; end |
#to_ruby ⇒ Object
30 |
# File 'lib/nydp/truth.rb', line 30 def to_ruby ; nil ; end |
#to_s ⇒ Object
24 |
# File 'lib/nydp/truth.rb', line 24 def to_s ; "" ; end |
#|(other) ⇒ Object
36 |
# File 'lib/nydp/truth.rb', line 36 def | other ; other ; end |