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
109
110
111
112
113
114
115
116
117
118
|
# File 'lib/rubylisp/ext.rb', line 109
def method_missing(name, *args, &block)
is_list_walk = name[0] == ?c && name[-1] == ?r && (name[1..-2].chars.all? {|e| "ad".include?(e)})
if is_list_walk
nil
else
super
end
end
|
Instance Method Details
49
50
51
|
# File 'lib/rubylisp/ext.rb', line 49
def car
nil
end
|
53
54
55
|
# File 'lib/rubylisp/ext.rb', line 53
def cdr
nil
end
|
#empty? ⇒ Boolean
69
70
71
|
# File 'lib/rubylisp/ext.rb', line 69
def empty?
true
end
|
#environment? ⇒ Boolean
105
106
107
|
# File 'lib/rubylisp/ext.rb', line 105
def environment?
false
end
|
#eq?(other) ⇒ Boolean
25
26
27
|
# File 'lib/rubylisp/ext.rb', line 25
def eq?(other)
other.nil? || (other.pair? && other.empty?)
end
|
#equal?(other) ⇒ Boolean
29
30
31
|
# File 'lib/rubylisp/ext.rb', line 29
def equal?(other)
other.nil? || (other.pair? && other.empty?)
end
|
#eqv?(other) ⇒ Boolean
21
22
23
|
# File 'lib/rubylisp/ext.rb', line 21
def eqv?(other)
other.nil? || (other.pair? && other.empty?)
end
|
#evaluate(env) ⇒ Object
41
42
43
|
# File 'lib/rubylisp/ext.rb', line 41
def evaluate(env)
nil
end
|
#evaluate_each(env) ⇒ Object
45
46
47
|
# File 'lib/rubylisp/ext.rb', line 45
def evaluate_each(env)
nil
end
|
#false? ⇒ Boolean
7
8
9
|
# File 'lib/rubylisp/ext.rb', line 7
def false?
false
end
|
140
141
142
|
# File 'lib/rubylisp/ext.rb', line 140
def flatten
nil
end
|
#function? ⇒ Boolean
124
125
126
|
# File 'lib/rubylisp/ext.rb', line 124
def function?
false
end
|
73
74
75
|
# File 'lib/rubylisp/ext.rb', line 73
def length
0
end
|
#lisp_object? ⇒ Boolean
136
137
138
|
# File 'lib/rubylisp/ext.rb', line 136
def lisp_object?
true
end
|
#list? ⇒ Boolean
97
98
99
|
# File 'lib/rubylisp/ext.rb', line 97
def list?
true
end
|
#number? ⇒ Boolean
85
86
87
|
# File 'lib/rubylisp/ext.rb', line 85
def number?
false
end
|
#object? ⇒ Boolean
128
129
130
|
# File 'lib/rubylisp/ext.rb', line 128
def object?
false
end
|
#pair? ⇒ Boolean
93
94
95
|
# File 'lib/rubylisp/ext.rb', line 93
def pair?
false
end
|
#primitive? ⇒ Boolean
120
121
122
|
# File 'lib/rubylisp/ext.rb', line 120
def primitive?
false
end
|
#print_string ⇒ Object
33
34
35
|
# File 'lib/rubylisp/ext.rb', line 33
def print_string
self.to_s
end
|
#print_string_helper ⇒ Object
37
38
39
|
# File 'lib/rubylisp/ext.rb', line 37
def print_string_helper
""
end
|
65
66
67
|
# File 'lib/rubylisp/ext.rb', line 65
def quoted
nil
end
|
#set_car!(s) ⇒ Object
57
58
59
|
# File 'lib/rubylisp/ext.rb', line 57
def set_car!(s)
nil
end
|
#set_cdr!(s) ⇒ Object
61
62
63
|
# File 'lib/rubylisp/ext.rb', line 61
def set_cdr!(s)
nil
end
|
#string? ⇒ Boolean
81
82
83
|
# File 'lib/rubylisp/ext.rb', line 81
def string?
false
end
|
#symbol? ⇒ Boolean
89
90
91
|
# File 'lib/rubylisp/ext.rb', line 89
def symbol?
false
end
|
16
17
18
|
# File 'lib/rubylisp/ext.rb', line 16
def to_ary
[]
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
|
132
133
134
|
# File 'lib/rubylisp/ext.rb', line 132
def type
:nil
end
|
77
78
79
|
# File 'lib/rubylisp/ext.rb', line 77
def value
nil
end
|
#vector? ⇒ Boolean
101
102
103
|
# File 'lib/rubylisp/ext.rb', line 101
def vector?
false
end
|