Class: Balmora::Context::Value

Inherits:
Balmora::Context show all
Defined in:
lib/balmora/context/value.rb

Instance Method Summary collapse

Methods inherited from Balmora::Context

#_not, #execute, #init, #initialize, #option

Methods inherited from Balmora::Command

#_execute, #execute, #init, #initialize, #option

Constructor Details

This class inherits a constructor from Balmora::Context

Instance Method Details

#optionsObject



3
4
5
# File 'lib/balmora/context/value.rb', line 3

def options()
  return super().concat([:value])
end

#runObject



15
16
17
# File 'lib/balmora/context/value.rb', line 15

def run()
  return @variables.inject(@value)
end

#verifyObject



7
8
9
10
11
12
13
# File 'lib/balmora/context/value.rb', line 7

def verify()
  if !@value
    raise Error.new('"value" should be defined')
  end

  super()
end