lib/bade/runtime/utils/where.rb
def is_class_primarily(klass)
        source_locations = is_class(klass)
        if source_locations.empty?
          methods = defined_methods(klass)
          msg = if methods.empty?
                  "#{klass} has no methods"
                else
                  "#{klass} only has built-in methods (#{methods.size} in total)"
                end

          raise ::ArgumentError, msg
        end
        source_locations[0]
      end
# Raises ArgumentError if klass does not have any Ruby methods defined in it.
Raises ArgumentError if klass does not have any Ruby methods defined in it.
Raises ArgumentError if klass does not have any Ruby methods defined in it .
def is_class_primarily(klass)
        source_locations = is_class(klass)
        if source_locations.empty?
          methods = defined_methods(klass)
          msg = if methods.empty?
                  "#{klass} has no methods"
                else
                  "#{klass} only has built-in methods (#{methods.size} in total)"
                end
          raise ::ArgumentError, msg
        end
        source_locations[0]
      end
def is_class_primarily ( klass ) source_locations = is_class ( klass ) if source_locations . empty? methods = defined_methods ( klass ) msg = if methods . empty? "#{klass} has no methods" else "#{klass} only has built-in methods (#{methods.size} in total)" end raise :: ArgumentError , msg end source_locations [ 0 ] end
Raises ArgumentError if klass does not have any Ruby methods defined in it.
Raises ArgumentError if klass does not have any Ruby methods defined in it .
klass