Class: Foghorn::Methods::I

Inherits:
Object
  • Object
show all
Defined in:
lib/foghorn/methods.rb

Overview

Direct Known Subclasses

Boy, Go

Class Method Summary collapse

Class Method Details

.boyObject



13
14
15
# File 'lib/foghorn/methods.rb', line 13

def self.boy
  Foghorn::Methods::I
end

.go_away(exit_code = 0) ⇒ Object



30
31
32
# File 'lib/foghorn/methods.rb', line 30

def self.go_away(exit_code = 0)
  exit exit_code
end

.iObject

These class methods (and aliases) allow us to repeat ourselves repeat ourselves without using method missing



8
9
10
# File 'lib/foghorn/methods.rb', line 8

def self.i
  Foghorn::Methods::I
end

.say(string_or_class = nil) ⇒ Object

If we get a string puts it, otherwise return our I class so we can recurse



21
22
23
24
25
26
27
# File 'lib/foghorn/methods.rb', line 21

def self.say(string_or_class = nil)
  if string_or_class
    puts string_or_class
  else
    Foghorn::Methods::I
  end
end