module Representable::Binding::Collection

generics for collection bindings.

Public Instance Methods

skipable_empty_value?(value) click to toggle source
# File lib/representable/binding.rb, line 110
def skipable_empty_value?(value)
  # TODO: this can be optimized, again.
  return true if value.nil? && !(self[:render_nil]) # FIXME: test this without the "and"

  true if (self[:render_empty] == false) && value && value.empty? # TODO: change in 2.0, don't render emtpy.
end