Class: Luoma::StrictUndefinedDrop
Overview
An "undefined" type that raises UndefinedVariableError in all contexts.
Instance Method Summary
collapse
-
#contains?(obj, context) ⇒ Boolean
-
#each ⇒ Object
-
#eq?(obj, context) ⇒ Boolean
-
#error ⇒ Object
-
#fetch(name, context, default: :nothing) ⇒ Object
-
#gt?(obj, context) ⇒ Boolean
-
#key?(obj, context) ⇒ Boolean
-
#length(context) ⇒ Object
-
#lt?(obj, context) ⇒ Boolean
-
#render(context) ⇒ Object
-
#slice(start, stop, step) ⇒ Object
-
#to_primitive(hint, context) ⇒ Object
-
#to_s ⇒ Object
#initialize
Methods inherited from Drop
#to_a
Instance Method Details
#contains?(obj, context) ⇒ Boolean
68
69
70
|
# File 'lib/luoma/drops/undefined.rb', line 68
def contains?(obj, context)
error
end
|
#each ⇒ Object
52
53
54
|
# File 'lib/luoma/drops/undefined.rb', line 52
def each(&)
error
end
|
#eq?(obj, context) ⇒ Boolean
56
57
58
|
# File 'lib/luoma/drops/undefined.rb', line 56
def eq?(obj, context)
error
end
|
#error ⇒ Object
94
95
96
97
98
99
100
101
|
# File 'lib/luoma/drops/undefined.rb', line 94
def error
raise UndefinedVariableError.new(
"#{@path.inspect} is undefined",
@token,
@source,
@template_name
)
end
|
#fetch(name, context, default: :nothing) ⇒ Object
48
49
50
|
# File 'lib/luoma/drops/undefined.rb', line 48
def fetch(name, context, default: :nothing)
error
end
|
#gt?(obj, context) ⇒ Boolean
64
65
66
|
# File 'lib/luoma/drops/undefined.rb', line 64
def gt?(obj, context)
error
end
|
#key?(obj, context) ⇒ Boolean
44
45
46
|
# File 'lib/luoma/drops/undefined.rb', line 44
def key?(obj, context)
error
end
|
#length(context) ⇒ Object
72
73
74
|
# File 'lib/luoma/drops/undefined.rb', line 72
def length(context)
error
end
|
#lt?(obj, context) ⇒ Boolean
60
61
62
|
# File 'lib/luoma/drops/undefined.rb', line 60
def lt?(obj, context)
error
end
|
#render(context) ⇒ Object
88
89
90
|
# File 'lib/luoma/drops/undefined.rb', line 88
def render(context)
error
end
|
#slice(start, stop, step) ⇒ Object
76
77
78
|
# File 'lib/luoma/drops/undefined.rb', line 76
def slice(start, stop, step)
error
end
|
#to_primitive(hint, context) ⇒ Object
80
81
82
|
# File 'lib/luoma/drops/undefined.rb', line 80
def to_primitive(hint, context)
error
end
|
#to_s ⇒ Object
84
85
86
|
# File 'lib/luoma/drops/undefined.rb', line 84
def to_s
error
end
|