Class: SayItWithGraphs::Characters::D

Inherits:
Object
  • Object
show all
Includes:
GraphControls
Defined in:
lib/say_it_with_graphs/characters/d.rb

Instance Method Summary collapse

Methods included from GraphControls

#frame, #initialize, #rnd_line

Instance Method Details

#defineObject



6
7
8
# File 'lib/say_it_with_graphs/characters/d.rb', line 6

def define
  'd'
end

#drawObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/say_it_with_graphs/characters/d.rb', line 10

def draw
  a = rnd_line
  b = rnd_line
  c = rnd_line
  frame do |f|
    f.line[a].at 0
    f.line[a].at 100
    f.line[b].at 0
  end
  frame do |f|
    f.line[a].at 100
    f.line[b].at 0
  end
  frame do |f|
    f.line[b].at 33
    f.line[b].at 66
    f.line[a].at 66
  end
end