Class: Shyguy

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

Overview

The main Shyguy class

Constant Summary collapse

VERSION =
'0.1.1'
SEPARATOR =
'|'
SYMBOL =
"\u00AD"
ALTERNATIVES =
['­', "\u00AD", '­', '­', '­'].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Shyguy

Returns a new instance of Shyguy.



13
14
15
16
17
# File 'lib/shyguy.rb', line 13

def initialize(text)
  @original_text = text
  normalize
  strip_hyphenation
end

Instance Attribute Details

#original_textObject (readonly)

Returns the value of attribute original_text.



11
12
13
# File 'lib/shyguy.rb', line 11

def original_text
  @original_text
end

#shyObject (readonly)

Returns the value of attribute shy.



11
12
13
# File 'lib/shyguy.rb', line 11

def shy
  @shy
end

#strippedObject (readonly)

Returns the value of attribute stripped.



11
12
13
# File 'lib/shyguy.rb', line 11

def stripped
  @stripped
end

Class Method Details

.display_shy(text) ⇒ Object



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

def self.display_shy(text)
  Shyguy.new(text).shy
end

.display_stripped(text) ⇒ Object



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

def self.display_stripped(text)
  Shyguy.new(text).stripped
end