Class: ActiverecordCursorPagination::ClassFormatter
- Inherits:
-
Object
- Object
- ActiverecordCursorPagination::ClassFormatter
- Defined in:
- lib/activerecord_cursor_pagination/class_formatter.rb
Instance Method Summary collapse
-
#format(klass_or_name) ⇒ String?
Format the class name.
Instance Method Details
#format(klass_or_name) ⇒ String?
Format the class name
9 10 11 12 13 14 15 16 17 |
# File 'lib/activerecord_cursor_pagination/class_formatter.rb', line 9 def format(klass_or_name) if klass_or_name.nil? || klass_or_name.is_a?(String) klass_or_name elsif klass_or_name.is_a? Symbol klass_or_name.to_s.camelcase else klass_or_name.name end end |