Class: RubyArena::RobotRenderer
- Inherits:
-
Object
- Object
- RubyArena::RobotRenderer
- Defined in:
- lib/ruby_arena/robot_renderer.rb
Instance Attribute Summary collapse
-
#robot ⇒ Object
readonly
Returns the value of attribute robot.
-
#window ⇒ Object
readonly
Returns the value of attribute window.
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(args) ⇒ RobotRenderer
constructor
A new instance of RobotRenderer.
Constructor Details
#initialize(args) ⇒ RobotRenderer
Returns a new instance of RobotRenderer.
5 6 7 8 |
# File 'lib/ruby_arena/robot_renderer.rb', line 5 def initialize(args) @robot = args.fetch(:robot) @window = args.fetch(:window) end |
Instance Attribute Details
#robot ⇒ Object (readonly)
Returns the value of attribute robot.
3 4 5 |
# File 'lib/ruby_arena/robot_renderer.rb', line 3 def robot @robot end |
#window ⇒ Object (readonly)
Returns the value of attribute window.
3 4 5 |
# File 'lib/ruby_arena/robot_renderer.rb', line 3 def window @window end |
Instance Method Details
#draw ⇒ Object
10 11 12 13 14 |
# File 'lib/ruby_arena/robot_renderer.rb', line 10 def draw draw_tank_body draw_gun draw_radar end |