Skip to content

Instantly share code, notes, and snippets.

View serdardalgic's full-sized avatar

Serdar Dalgıç serdardalgic

View GitHub Profile
@serdardalgic
serdardalgic / ruby_block_given
Created October 15, 2014 08:54
Ruby block_given and yield example
class MyArray
attr_reader :array
def initialize(array)
@array = array
end
def sum(initial_value = 0)
return array.inject(:+) + initial_value unless block_given?
sum = initial_value

Keybase proof

I hereby claim:

  • I am serdardalgic on github.
  • I am serdard (https://keybase.io/serdard) on keybase.
  • I have a public key ASAHWkeR431I6labn18YE9mcaA5UeqCxJmXhmStvCK8yjwo

To claim this, I am signing this object:

@serdardalgic
serdardalgic / bumpme
Last active August 7, 2018 13:19
concourse tutorial
Tue Aug 7 13:19:06 UTC 2018