Class: Bagel::Graphic::Scoreboard::Server
- Inherits:
-
Object
- Object
- Bagel::Graphic::Scoreboard::Server
- Defined in:
- lib/bagel/graphic/scoreboard/server.rb
Constant Summary collapse
- WIDTH =
10
- HEIGHT =
50
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(is_server) ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize(is_server) ⇒ Server
Returns a new instance of Server.
7 8 9 |
# File 'lib/bagel/graphic/scoreboard/server.rb', line 7 def initialize(is_server) @is_server = is_server end |
Instance Method Details
#draw ⇒ Object
11 12 13 |
# File 'lib/bagel/graphic/scoreboard/server.rb', line 11 def draw Image.new(WIDTH, HEIGHT) { |i| i.background_color = @is_server ? COLOR_ORANGE : COLOR_GREY } end |