Class: NilClass
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
83
84
85
86
87
88
89
|
# File 'lib/rubylisp/ext.rb', line 83
def method_missing(name, *args, &block)
if name[0] == ?c && name[-1] == ?r && (name[1..-2].chars.all? {|e| "ad".include?(e)})
nil
else
super
end
end
|
Instance Method Details
31
32
33
|
# File 'lib/rubylisp/ext.rb', line 31
def car
nil
end
|
35
36
37
|
# File 'lib/rubylisp/ext.rb', line 35
def cdr
nil
end
|
#empty? ⇒ Boolean
51
52
53
|
# File 'lib/rubylisp/ext.rb', line 51
def empty?
true
end
|
#eq?(other) ⇒ Boolean
15
16
17
|
# File 'lib/rubylisp/ext.rb', line 15
def eq?(other)
other.nil?
end
|
#evaluate(env) ⇒ Object
23
24
25
|
# File 'lib/rubylisp/ext.rb', line 23
def evaluate(env)
nil
end
|
#evaluate_each(env) ⇒ Object
27
28
29
|
# File 'lib/rubylisp/ext.rb', line 27
def evaluate_each(env)
nil
end
|
#false? ⇒ Boolean
7
8
9
|
# File 'lib/rubylisp/ext.rb', line 7
def false?
true
end
|
#function? ⇒ Boolean
95
96
97
|
# File 'lib/rubylisp/ext.rb', line 95
def function?
false
end
|
55
56
57
|
# File 'lib/rubylisp/ext.rb', line 55
def length
0
end
|
#lisp_object? ⇒ Boolean
107
108
109
|
# File 'lib/rubylisp/ext.rb', line 107
def lisp_object?
true
end
|
#list? ⇒ Boolean
79
80
81
|
# File 'lib/rubylisp/ext.rb', line 79
def list?
true
end
|
#number? ⇒ Boolean
67
68
69
|
# File 'lib/rubylisp/ext.rb', line 67
def number?
false
end
|
#object? ⇒ Boolean
99
100
101
|
# File 'lib/rubylisp/ext.rb', line 99
def object?
false
end
|
#pair? ⇒ Boolean
75
76
77
|
# File 'lib/rubylisp/ext.rb', line 75
def pair?
false
end
|
#primitive? ⇒ Boolean
91
92
93
|
# File 'lib/rubylisp/ext.rb', line 91
def primitive?
false
end
|
#print_string ⇒ Object
19
20
21
|
# File 'lib/rubylisp/ext.rb', line 19
def print_string
self.to_s
end
|
47
48
49
|
# File 'lib/rubylisp/ext.rb', line 47
def quoted
nil
end
|
#set_car!(s) ⇒ Object
39
40
41
|
# File 'lib/rubylisp/ext.rb', line 39
def set_car!(s)
nil
end
|
#set_cdr!(s) ⇒ Object
43
44
45
|
# File 'lib/rubylisp/ext.rb', line 43
def set_cdr!(s)
nil
end
|
#string? ⇒ Boolean
63
64
65
|
# File 'lib/rubylisp/ext.rb', line 63
def string?
false
end
|
#symbol? ⇒ Boolean
71
72
73
|
# File 'lib/rubylisp/ext.rb', line 71
def symbol?
false
end
|
11
12
13
|
# File 'lib/rubylisp/ext.rb', line 11
def to_s
"()"
end
|
#true? ⇒ Boolean
3
4
5
|
# File 'lib/rubylisp/ext.rb', line 3
def true?
false
end
|
103
104
105
|
# File 'lib/rubylisp/ext.rb', line 103
def type
:nil
end
|
59
60
61
|
# File 'lib/rubylisp/ext.rb', line 59
def value
nil
end
|