Skip to content

Instantly share code, notes, and snippets.

class Todo
attr_accessor :title, :description
attr_reader :priority, :urgency
def initialize(priority: 1, urgency: 1)
@priority, @urgency = priority, urgency
raise ArgumentError, "urgency must be between 1 and 10" unless (1..10).cover?(@urgency)
raise ArgumentError, "priority must be between 1 and 10" unless (1..10).cover?(@priority)
end
def quadrant