Class: Devilicious::Formatter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/devilicious/formatters/base.rb

Direct Known Subclasses

Summary, Table, Verbose

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inherited(child) ⇒ Object



8
9
10
11
# File 'lib/devilicious/formatters/base.rb', line 8

def self.inherited(child)
  formatter = child.new
  Formatter.list[formatter.to_s] = formatter
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/devilicious/formatters/base.rb', line 13

def to_s
  self.class.to_s.gsub(/.*::/, "")
end