Class: PlainText::Part::Boundary

Inherits:
Object
  • Object
show all
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

Methods included from StringType

#clone, #dup, #inspect, #method_missing, #respond_to_missing?, #to_s

Methods included from BuiltinType

#subclass_name

Constructor Details

#initialize(str) ⇒ Boundary

Constructor

Parameters:



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

Returns:

  • (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

Returns:

  • (Boolean)


36
37
38
# File 'lib/plain_text/part/boundary.rb', line 36

def boundary?
  true
end

#paragraph?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/plain_text/part/boundary.rb', line 40

def paragraph?
  false
end

#part?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/plain_text/part/boundary.rb', line 44

def part?
  false
end