Class: PlainText::Part::Boundary
- Inherits:
-
Object
- Object
- PlainText::Part::Boundary
- Includes:
- BuiltinType, StringType
- Defined in:
- lib/plain_text/part/boundary.rb
Overview
Class to express a Boundary, which behaves like a String
This used to be a sub-class of String up to Ver.0.7.1
Constant Summary collapse
- Empty =
Empty Boundary instance
self.new ""
Instance Method Summary collapse
- #<=>(other) ⇒ Integer, NilClass
-
#==(other) ⇒ Object
String#== refers to this.
- #boundary? ⇒ Boolean
-
#initialize(str) ⇒ Boundary
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) ⇒ Boundary
Constructor
20 21 22 |
# File 'lib/plain_text/part/boundary.rb', line 20 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
25 26 27 |
# File 'lib/plain_text/part/boundary.rb', line 25 def <=>(other) _equal_cmp(other, __method__){ super } end |
#==(other) ⇒ Object
String#== refers to this.
32 33 34 |
# File 'lib/plain_text/part/boundary.rb', line 32 def ==(other) _equal_cmp(other, __method__){ super } end |
#boundary? ⇒ Boolean
36 37 38 |
# File 'lib/plain_text/part/boundary.rb', line 36 def boundary? true end |
#paragraph? ⇒ Boolean
40 41 42 |
# File 'lib/plain_text/part/boundary.rb', line 40 def paragraph? false end |
#part? ⇒ Boolean
44 45 46 |
# File 'lib/plain_text/part/boundary.rb', line 44 def part? false end |