Class: Ruspea::Runtime::Env::Empty

Inherits:
Object
  • Object
show all
Includes:
Error, Singleton
Defined in:
lib/ruspea/runtime/env.rb

Instance Method Summary collapse

Constructor Details

#initialize(*_) ⇒ Empty

Returns a new instance of Empty.



9
10
# File 'lib/ruspea/runtime/env.rb', line 9

def initialize(*_)
end

Instance Method Details

#==(other) ⇒ Object



28
29
30
31
# File 'lib/ruspea/runtime/env.rb', line 28

def ==(other)
  return true if other.is_a? Empty
  false
end

#around(env) ⇒ Object



24
25
26
# File 'lib/ruspea/runtime/env.rb', line 24

def around(env)
  env
end

#define(*_) ⇒ Object



12
13
14
# File 'lib/ruspea/runtime/env.rb', line 12

def define(*_)
  nil
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ruspea/runtime/env.rb', line 20

def eql?(other)
  self == other
end

#lookup(sym) ⇒ Object

Raises:



16
17
18
# File 'lib/ruspea/runtime/env.rb', line 16

def lookup(sym)
  raise(Resolution.new(sym))
end