Class: Chaltron::Banner

Inherits:
Object
  • Object
show all
Defined in:
lib/chaltron/banner.rb

Instance Method Summary collapse

Constructor Details

#initializeBanner

Returns a new instance of Banner.



5
6
7
# File 'lib/chaltron/banner.rb', line 5

def initialize
  @banners = populate_banners
end

Instance Method Details

#binaryObject



19
20
21
# File 'lib/chaltron/banner.rb', line 19

def binary
  '01000011 01101000 01100001 01101100 01110100 01110010 01101111 01101110'
end

#hexObject



23
24
25
# File 'lib/chaltron/banner.rb', line 23

def hex
  '43 68 61 6C 74 72 6F 6E'
end

#morseObject



27
28
29
# File 'lib/chaltron/banner.rb', line 27

def morse
  '-.-. .... .- .-.. - .-. --- -.'
end

#octalObject



15
16
17
# File 'lib/chaltron/banner.rb', line 15

def octal
  '103 150 141 154 164 162 157 156'
end

#sample(version = true) ⇒ Object



9
10
11
12
13
# File 'lib/chaltron/banner.rb', line 9

def sample(version = true)
  ret = @banners.sample
  ret = ret.chomp.+ "v.#{Chaltron::VERSION}\n" if version
  ret
end