Class: Facebokr::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/facebokr/shell.rb

Defined Under Namespace

Classes: Sandbox

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Shell

Returns a new instance of Shell.



34
35
36
# File 'lib/facebokr/shell.rb', line 34

def initialize(app)
  @app = app
end

Instance Attribute Details

#appObject

Returns the value of attribute app.



32
33
34
# File 'lib/facebokr/shell.rb', line 32

def app
  @app
end

Instance Method Details

#runObject



38
39
40
41
42
# File 'lib/facebokr/shell.rb', line 38

def run
  while buf = Readline.readline(prompt, true) do
    puts format Sandbox.new(app).instance_eval(buf)
  end
end