module Iteraptor::H
helpers
Constants
- DELIMITER
Public Class Methods
enumerable_parent?(receiver)
click to toggle source
# File lib/iteraptor.rb, line 233 def enumerable_parent?(receiver) [Hash, Array, Enumerable].detect(&receiver.method(:is_a?)) end
iteraptor_delimiter(params)
click to toggle source
# File lib/iteraptor.rb, line 221 def iteraptor_delimiter(params) params[:delimiter] || DELIMITER end
push_flatten_compact(array, tail)
click to toggle source
# File lib/iteraptor.rb, line 225 def push_flatten_compact array, tail case array when NilClass then [tail] when Array then array + [tail] else [array, tail] end.compact end
safe_symbolize(key)
click to toggle source
# File lib/iteraptor.rb, line 217 def safe_symbolize key key.respond_to?(:to_sym) ? key.to_sym : key end