Here is my solution.

Aaron


class Circle
  attr_accessor :radius, :aspect_ratio

  def initialize(radius, aspect_ratio)
    self.radius = radius
    self.aspect_ratio = aspect_ratio == 0 ? 1 : aspect_ratio
  end

  def to_s
    (0..y_diameter).inject('') do |rows, y|
      rows + (0..x_diameter).inject('') do |row, x|
        row + (on_circle?(x, y) ? '#' : ' ')
      end + "\n"
    end
  end

  private

  def y_diameter
    radius * 2
  end

  def x_diameter
    y_diameter * aspect_ratio
  end

  def on_circle?(x,y)
    Math.sqrt((x/aspect_ratio-radius)**2 + (y-radius)**2).round ==
radius
  end
end

print Circle.new(ARGV[0].to_i, ARGV[1].to_f).to_s