class Blueprinter::Field

def callable_from(condition)

def callable_from(condition)
  config = Blueprinter.configuration
  # Use field-level callable, or when not defined, try global callable
  tmp = if options.key?(condition)
          options.fetch(condition)
        elsif config.valid_callable?(condition)
          config.public_send(condition)
        end
  return false unless tmp
  case tmp
  when Proc then tmp
  when Symbol then blueprint.method(tmp)
  else
    raise ArgumentError, "#{tmp.class} is passed to :#{condition}"
  end
end