Class: WLang::Scope::NullScope
Instance Attribute Summary
Attributes inherited from WLang::Scope
#parent, #subject
Instance Method Summary
collapse
chain, coerce, #evaluate, null, #pop, #push, #root, #with
Constructor Details
Returns a new instance of NullScope.
5
6
7
|
# File 'lib/wlang/scope/null_scope.rb', line 5
def initialize
super(nil)
end
|
Instance Method Details
#fetch(key, dialect = nil, unfound = nil) ⇒ Object
9
10
11
|
# File 'lib/wlang/scope/null_scope.rb', line 9
def fetch(key, dialect = nil, unfound = nil)
unfound ? unfound.call : throw(:fail)
end
|
#inspect ⇒ Object
Also known as:
to_s
17
18
19
|
# File 'lib/wlang/scope/null_scope.rb', line 17
def inspect
"NullScope"
end
|
#subjects ⇒ Object
13
14
15
|
# File 'lib/wlang/scope/null_scope.rb', line 13
def subjects
[]
end
|