MarcRic's test

Ruby code posted by Marcos Ricardo
created at 03 Aug 21:38

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
class MyOwnRubyClass
  def my_own_ruby_method(my_parameter, your_parameter)
    puts Time.now
    current_month = Time.now.month
    yield(my_parameter,your_parameter,current_month )
  end
end

my_instance = MyOwnRubyClass.new

my_instance.my_own_ruby_method('marcos','ricardo') { |arg1, arg2,arg3| 1.upto(arg3) do |n| ; puts "#{n.to_s} #{arg1.reverse}, #{arg2.reverse}"; end }

my_instance.my_own_ruby_method('marcos','ricardo') { |arg1, arg2,arg3| 1.upto(arg3) do |n| ; puts "#{n.to_s} first value = #{arg1.size}, second value = #{arg2.size}, addition value = #{arg1.size+arg2.size}"; end }
598 Bytes in 3 ms with coderay