Class: Object

Inherits:
BasicObject
Defined in:
lib/bio/shell/object.rb

Overview

Object extention

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#memoObject

Couldn’t work for Fixnum (Marshal)



20
21
22
# File 'lib/bio/shell/object.rb', line 20

def memo
  @memo
end

Instance Method Details

#output(format = :yaml) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/bio/shell/object.rb', line 22

def output(format = :yaml)
  case format
  when :yaml
    self.to_yaml
  when :html
    format_html
  when :inspect
    format_pp
  when :png
    # *TODO*
  when :svg
    # *TODO*
  when :graph
    # *TODO* (Gruff, RSRuby etc.)
  else
    #self.inspect.to_s.fold(80)
    self.to_s
  end
end