Class: Runt::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/runt/schedule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Event

Returns a new instance of Event.

Raises:

  • (Exception)


75
76
77
78
# File 'lib/runt/schedule.rb', line 75

def initialize(id)
  raise Exception, "id argument cannot be nil" unless !id.nil?
  @id=id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



73
74
75
# File 'lib/runt/schedule.rb', line 73

def id
  @id
end

Instance Method Details

#==(other) ⇒ Object



82
83
84
# File 'lib/runt/schedule.rb', line 82

def == (other)
  return true if other.kind_of?(Event) && @id==other.id
end

#to_sObject



80
# File 'lib/runt/schedule.rb', line 80

def to_s; @id.to_s end