Class: SayItWithGraphs::Characters::R

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

Instance Method Summary collapse

Methods included from GraphControls

#frame, #initialize, #rnd_line

Instance Method Details

#defineObject



8
9
10
# File 'lib/say_it_with_graphs/characters/r.rb', line 8

def define
  'r'
end

#drawObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/say_it_with_graphs/characters/r.rb', line 12

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

    f.line[b].at 0
    f.line[b].at 50

    f.line[c].at 0
    f.line[c].at 50
  end
  frame do |f|
    f.line[a].at 88
    f.line[b].at 65
    f.line[c].at 65
  end
  frame do |f|
    f.line[a].at 75
    f.line[b].at 75
    f.line[c].at 0
  end
end