Class: TableInspector::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/table_inspector/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, presenter_option) ⇒ Table

Returns a new instance of Table.



7
8
9
10
11
# File 'lib/table_inspector/table.rb', line 7

def initialize(klass, presenter_option)
  @klass = klass
  @presenter = Presenter.current.new(klass, presenter_option)
  @presenter_option = presenter_option
end

Instance Attribute Details

#klassObject (readonly)

Returns the value of attribute klass.



4
5
6
# File 'lib/table_inspector/table.rb', line 4

def klass
  @klass
end

#presenterObject (readonly)

Returns the value of attribute presenter.



4
5
6
# File 'lib/table_inspector/table.rb', line 4

def presenter
  @presenter
end

#presenter_optionObject (readonly)

Returns the value of attribute presenter_option.



4
5
6
# File 'lib/table_inspector/table.rb', line 4

def presenter_option
  @presenter_option
end

Instance Method Details

#renderObject



13
14
15
16
17
18
19
20
# File 'lib/table_inspector/table.rb', line 13

def render
  break_line # empty line
  render_title
  render_body
  break_line # empty line
  render_indexes
  break_line # empty line
end