Class: C4::App

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/c4.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApp

Returns a new instance of App.



15
16
17
18
# File 'lib/c4.rb', line 15

def initialize
  @game = C4::Model::Game.new
  @viewer = C4::View::Cli.new(game)
end

Instance Attribute Details

#gameObject (readonly)

Returns the value of attribute game.



13
14
15
# File 'lib/c4.rb', line 13

def game
  @game
end

#viewerObject (readonly)

Returns the value of attribute viewer.



13
14
15
# File 'lib/c4.rb', line 13

def viewer
  @viewer
end

Instance Method Details

#runObject



20
21
22
23
# File 'lib/c4.rb', line 20

def run
  start
  finish
end