Class: PlainText::Part::Paragraph
- Inherits:
-
Object
- Object
- PlainText::Part::Paragraph
- Includes:
- BuiltinType, StringType
- Defined in:
- lib/plain_text/part/paragraph.rb
Overview
Class to express a Paragraph as String
Constant Summary collapse
- Empty =
Empty Paragraph instance
self.new ""
Instance Method Summary collapse
- #<=>(other) ⇒ Integer, NilClass
-
#==(other) ⇒ Object
String#== refers to this.
- #boundary? ⇒ Boolean
-
#initialize(str) ⇒ Paragraph
constructor
Constructor.
- #paragraph? ⇒ Boolean
- #part? ⇒ Boolean
Methods included from StringType
#clone, #dup, #inspect, #method_missing, #respond_to_missing?, #to_s
Methods included from BuiltinType
Constructor Details
#initialize(str) ⇒ Paragraph
Constructor
18 19 20 |
# File 'lib/plain_text/part/paragraph.rb', line 18 def initialize(str) @string = str end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PlainText::Part::StringType
Instance Method Details
#<=>(other) ⇒ Integer, NilClass
29 30 31 |
# File 'lib/plain_text/part/paragraph.rb', line 29 def <=>(other) _equal_cmp(other, __method__){ super } end |
#==(other) ⇒ Object
String#== refers to this.
36 37 38 |
# File 'lib/plain_text/part/paragraph.rb', line 36 def ==(other) _equal_cmp(other, __method__){ super } end |
#boundary? ⇒ Boolean
40 41 42 |
# File 'lib/plain_text/part/paragraph.rb', line 40 def boundary? false end |
#paragraph? ⇒ Boolean
44 45 46 |
# File 'lib/plain_text/part/paragraph.rb', line 44 def paragraph? true end |
#part? ⇒ Boolean
48 49 50 |
# File 'lib/plain_text/part/paragraph.rb', line 48 def part? false end |