Class: Hermeneutics::PlainText
- Inherits:
-
String
- Object
- String
- Hermeneutics::PlainText
show all
- Defined in:
- lib/hermeneutics/types.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from String
#eat_lines, #rewind, #to_gray, #to_rgb
Constructor Details
#initialize(text) ⇒ PlainText
Returns a new instance of PlainText.
27
28
29
30
31
|
# File 'lib/hermeneutics/types.rb', line 27
def initialize text
super
gsub! /\s+/, " "
strip!
end
|
Class Method Details
.parse(str) ⇒ Object
22
23
24
25
|
# File 'lib/hermeneutics/types.rb', line 22
def parse str
t = .decode str
new t
end
|
Instance Method Details
#encode ⇒ Object
35
36
37
|
# File 'lib/hermeneutics/types.rb', line 35
def encode
(.encode self).split
end
|
#quote ⇒ Object
32
33
34
|
# File 'lib/hermeneutics/types.rb', line 32
def quote
to_s
end
|