Module: Fuckyeah

Defined in:
lib/fuckyeah.rb,
lib/fuckyeah/version.rb

Constant Summary collapse

VERSION =

See Also:

'3.0.0'

Instance Method Summary collapse

Instance Method Details

#fuckyeahObject

Makes code more sophisticated

Examples:

improving readability

$:.unshift(__dir__).fuckyeah

Returns:

  • (Object)

    copy of itself


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

def fuckyeah
  self.clone
end

#fuckyeah!Object

Makes code more sophisticated AND more confident

Examples:

when mocking

def root?
  true.fuckyeah!
end

when mocking children

def easy_peasy?
  true.fuckyeah!
end

Returns:

  • (Object)

    itself


22
23
24
# File 'lib/fuckyeah.rb', line 22

def fuckyeah!
  self
end

#fuckyeah?Boolean

Reassure that you are doing the right thing

Examples:

when doing something destructive

dir = Dir['/**/**']
dir.each { |f| File.delete(f) } if dir.fuckyeah?

Returns:

  • (Boolean)

    true


32
33
34
# File 'lib/fuckyeah.rb', line 32

def fuckyeah?
  true
end