Module: ToyRobot::Factory::ViewFactory

Defined in:
lib/toy_robot/factory.rb

Class Method Summary collapse

Class Method Details

.create(opts = {}) ⇒ Object



35
36
37
38
39
40
41
42
43
# File 'lib/toy_robot/factory.rb', line 35

def create(opts = {})
  robot = opts[:robot] || RobotFactory.create
  output = opts[:output] || $stdout

  ToyRobot::View.new(
    robot: robot,
    output: output
  )
end