Module: Tabloid::ColumnExtensions

Defined in:
lib/tabloid/column_extensions.rb

Instance Method Summary collapse

Instance Method Details

#[](val) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/tabloid/column_extensions.rb', line 3

def [](val)
  if val.is_a?(String) || val.is_a?(Symbol)
    self.detect { |c| c.key == val }
  else
    super
  end
end