This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KCODE = "UTF-8" | |
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_wert(frage) | |
puts(frage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KCODE = "UTF-8" | |
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_wert(frage) | |
puts(frage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KCODE = "UTF-8" | |
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_wert(frage) | |
puts(frage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shoes.app :width => 320, :height => 300 do | |
stack :margin => 20 do | |
stack :margin => 10 do | |
para "Gewicht" | |
@weight = edit_line | |
end | |
stack :margin => 10 do | |
para "Größe" | |
@size = edit_line | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KCODE = "UTF-8" | |
class BmiRechner | |
def initialize | |
self.get_name | |
puts "WIr werden jetzt herausfinden ob sie\n-zu dick\n-zu duenn\n-oder genau richtig sind." | |
end | |
def get_wert(frage) | |
puts(frage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'tk' | |
class BMI | |
def run | |
@window.mainloop | |
end | |
def initialize | |
@window = TkRoot.new(:title => 'BMI', 'height' => 304, 'width' => 258) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'tk' | |
class BMI | |
def run | |
@window.mainloop | |
end | |
def initialize | |
@window = TkRoot.new(:title => 'BMI', 'height' => 304, 'width' => 258) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'tk' | |
#Schere Stein Papier spiel | |
class SSP | |
def run | |
@window.mainloop | |
end | |
def initialize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Proc | |
def curry(*args) | |
if args.empty? | |
self | |
else | |
lambda { |*arguments| self.call *(args + arguments) } | |
end | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test | |
puts "vor yield" | |
ret_value = yield | |
puts "Return value: #{ret_value}" | |
puts "nach yield" | |
end | |
def test2 | |
test do | |
puts "yield" |