jmonteiro / aprendaaprogramar

Chris Pine's tutorial "Learn to Program" translated to portuguese by a team of volunteers. Coordinated by Fábio 'akitaonrails' Akita (http://www.akitaonrails.com).

aprendaaprogramar / lib / learn_to_program_tutorial.rb
100644 59 lines (46 sloc) 1.54 kb
1
2
3
4
5
6
7
8
9
10
11
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#! /usr/bin/env ruby
 
 
#-----------------------------------------------#
# Learn to Program #
# by Chris Pine #
# Copyright (c) 2003-2006 #
# chris@pine.fm #
#-----------------------------------------------#
 
 
require 'cgi'
require 'stringio'
 
Dir.glob(File.dirname(__FILE__) + '/learn_to_program_tutorial/*').each { |file| require_dependency file }
 
LINKADDR = '/'
FRLTP_ADDR = 'http://pragmaticprogrammer.com/titles/fr_ltp'
 
HLINE = '<div class="fleur"><div class="fleur_stem">&nbsp;</div></div>'
 
# If you decide to change coloring or formatting of this tutorial,
# you'll want to change these to something appropriate.
NUMBER_COLOR = 'verde'
STRING_COLOR = 'vermelho'
KEYWORD_COLOR = 'azul'
INPUT_DESC = 'caixa branca'
OUTPUT_DESC = 'caixa azul'
 
# Delimiter for input to sample code, since it comes out
# right alongside the output. Must not be html escapable.
INPUT = "%%%'f'o'o'"
 
class LearnToProgramTutorial
  @@NUMBER_COLOR = NUMBER_COLOR
  @@STRING_COLOR = STRING_COLOR
  @@KEYWORD_COLOR = KEYWORD_COLOR
  @@INPUT_DESC = INPUT_DESC
  @@OUTPUT_DESC = OUTPUT_DESC
  
  include LearnToProgram
  include FormattingPage
  include Setup
  include Numbers
  include Letters
  include Variables
  include Conversion
  include Methods
  include FlowControl
  include Arrays
  include DefMethods
  include Classes
  include BlocksProcs
  include Beyond
  
  include Menu
  include Main
end