more crap
This commit is contained in:
parent
5e7e6553ab
commit
e53ad11e51
15
metherds.rb
Normal file
15
metherds.rb
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
def main()
|
||||||
|
5.times { puts "Mice!\n" }
|
||||||
|
|
||||||
|
ele = "Elephants like Peanuts, but they is poison!!"
|
||||||
|
|
||||||
|
puts ele + ' is of length = ' + ele.length.to_s
|
||||||
|
|
||||||
|
puts "I yam: " + self.to_s
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if __FILE__ == $0
|
||||||
|
main()
|
||||||
|
end
|
27
mydefs.rb
Normal file
27
mydefs.rb
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
def hello()
|
||||||
|
puts 'Hello!'
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def hello_to(name)
|
||||||
|
puts 'Hello thar ' + name.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def hello_again_to name
|
||||||
|
puts 'Why hello again ' + name.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def main()
|
||||||
|
puts 'your name be? '
|
||||||
|
name = gets().chomp()
|
||||||
|
hello()
|
||||||
|
hello_to(name)
|
||||||
|
hello_again_to(name)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if __FILE__ == $0
|
||||||
|
main()
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user