Class: ObjectTable::StaticView
- Inherits:
-
Object
- Object
- ObjectTable::StaticView
- Includes:
- ViewMethods
- Defined in:
- lib/object_table/static_view.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#indices ⇒ Object
readonly
Returns the value of attribute indices.
Attributes included from TableMethods
Instance Method Summary collapse
- #add_column(name, *args) ⇒ Object
- #columns ⇒ Object
-
#initialize(parent, indices) ⇒ StaticView
constructor
A new instance of StaticView.
Methods included from ViewMethods
Methods included from TableChild
#__group_cls__, #__static_view_cls__, #__table_cls__, #__view_cls__
Methods included from TableMethods
#==, #_get_sort_index, #apply, #clone, #colnames, #group_by, #method_missing, #ncols, #nrows, #pop_column, #respond_to?, #set_column, #sort_by, #where
Methods included from Printable
get_printable_column, get_printable_line_numbers, #inspect
Constructor Details
#initialize(parent, indices) ⇒ StaticView
Returns a new instance of StaticView.
9 10 11 12 13 14 |
# File 'lib/object_table/static_view.rb', line 9 def initialize(parent, indices) super() @parent = parent @indices = indices columns end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ObjectTable::TableMethods
Instance Attribute Details
#indices ⇒ Object (readonly)
Returns the value of attribute indices.
7 8 9 |
# File 'lib/object_table/static_view.rb', line 7 def indices @indices end |
Instance Method Details
#add_column(name, *args) ⇒ Object
20 21 22 |
# File 'lib/object_table/static_view.rb', line 20 def add_column(name, *args) @columns[name] = super end |
#columns ⇒ Object
16 17 18 |
# File 'lib/object_table/static_view.rb', line 16 def columns @columns ||= super end |