Class: Runt::Event

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

Overview

TODO: Extend event to take other attributes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Event

Returns a new instance of Event.

Raises:

  • (Exception)


93
94
95
96
# File 'lib/runt/schedule.rb', line 93

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.



91
92
93
# File 'lib/runt/schedule.rb', line 91

def id
  @id
end

Instance Method Details

#==(other) ⇒ Object



100
101
102
# File 'lib/runt/schedule.rb', line 100

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

#to_sObject



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

def to_s; @id.to_s end