Class: Donkey

Inherits:
Object
  • Object
show all
Defined in:
lib/rubynovice/donkey.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) ex1_1



3
4
5
# File 'lib/rubynovice/donkey.rb', line 3

def ex1_1
  return "hello world.\n"
end

- (Object) ex1_2



7
8
9
# File 'lib/rubynovice/donkey.rb', line 7

def ex1_2
  return 1+1
end

- (Object) ex1_3



11
12
13
14
15
# File 'lib/rubynovice/donkey.rb', line 11

def ex1_3
  ans = 1+1
  text = sprintf("ans=%i\n",ans)
  return text
end