class PlainText::Part::Paragraph
Constants
Public Instance Methods
inspect()
click to toggle source
@return [String]
# File lib/plain_text/part/paragraph.rb, line 10 def inspect # 'Paragraph("abc\ndef")' or like 'Paragraph::Title("My Title")' s = self.class.name sprintf "%s(%s)", (s.split('::')[2..-1].join('::') rescue s), super end
subclass_name()
click to toggle source
Paragraph
sub-class name
Make sure your class is a child class of Paragraph
. Otherwise this method would not be inherited, obviously.
@return [String] @see PlainText::Part#subclass_name
# File lib/plain_text/part/paragraph.rb, line 23 def subclass_name printf "__method__=(%s)\n", __method__ self.class.name.split(/\A#{Regexp.quote method(__method__).owner.name}::/)[1] || '' end