Class: Hermeneutics::PlainText

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ PlainText

Returns a new instance of PlainText.



28
29
30
# File 'lib/hermeneutics/types.rb', line 28

def initialize value
  self.value = value
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



27
28
29
# File 'lib/hermeneutics/types.rb', line 27

def value
  @value
end

Class Method Details

.parse(str) ⇒ Object



22
23
24
25
# File 'lib/hermeneutics/types.rb', line 22

def parse str
  t = HeaderExt.decode str
  new t
end

Instance Method Details

#encodeObject



39
40
41
# File 'lib/hermeneutics/types.rb', line 39

def encode
  HeaderExt.encode @value
end

#to_sObject Also known as: quote



37
# File 'lib/hermeneutics/types.rb', line 37

def to_s ; @value ; end