Class: Bort::Schedule::Schedule

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#effective_dateObject

Returns the value of attribute effective_date.



239
240
241
# File 'lib/bort/schedule.rb', line 239

def effective_date
  @effective_date
end

#schedule_idObject

Returns the value of attribute schedule_id.



239
240
241
# File 'lib/bort/schedule.rb', line 239

def schedule_id
  @schedule_id
end

Class Method Details

.parse(doc) ⇒ Object



241
242
243
244
245
246
247
# File 'lib/bort/schedule.rb', line 241

def self.parse(doc)
  schedule                = Schedule.new
  schedule.schedule_id    = doc.attributes['id'].to_i
  schedule.effective_date = Time.parse(doc.attributes['effectivedate'])

  schedule
end

Instance Method Details

#<=>(other) ⇒ Object



249
250
251
# File 'lib/bort/schedule.rb', line 249

def <=> other
  self.schedule_id <=> other.schedule_id
end