Module: Nth::AccessMethods

Defined in:
lib/nth.rb

Overview

methods to include in base classes:

Class Method Summary collapse

Class Method Details

.get_ordinal_at(object, ordinal) ⇒ Object



696
697
698
699
700
# File 'lib/nth.rb', line 696

def self.get_ordinal_at(object, ordinal)
  n = Nth::get_n_from_string(ordinal)
  return nil if n.nil?
  return object[n-1]
end