Class: PlainText::Part::Boundary
- Defined in:
- lib/plain_text/part/boundary.rb
Overview
Class to express a Boundary as String
Constant Summary collapse
- Empty =
Empty Boundary instance
self.new ""
Instance Method Summary collapse
- #inspect ⇒ String
-
#subclass_name ⇒ String
Boundary sub-class name only.
Methods included from Split
count_lines, #count_lines, count_regexp, #count_regexp, #split_with_delimiter, split_with_delimiter
Instance Method Details
#inspect ⇒ String
11 12 13 14 15 |
# File 'lib/plain_text/part/boundary.rb', line 11 def inspect # 'Boundary("\n\n\n")' s = self.class.name sprintf "%s(%s)", (s.split('::')[2..-1].join('::') rescue s), super end |
#subclass_name ⇒ String
Boundary sub-class name only
Make sure your class is a child class of Boundary. Otherwise this method would not be inherited, obviously.
33 34 35 36 |
# File 'lib/plain_text/part/boundary.rb', line 33 def subclass_name printf "__method__=(%s)\n", __method__ self.class.name.split(/\A#{Regexp.quote method(__method__).owner.name}::/)[1] || '' end |