Sha256: ade38c0f78402a13b3e810b478c4c185d3dcc1d8f0243613c497f41cc53c37b6
Contents?: true
Size: 668 Bytes
Versions: 2
Compression:
Stored size: 668 Bytes
Contents
module NetworkExecutive class ScheduledProgram attr_accessor :program, :occurrence, :remainder, :portion def initialize( *args ) @program, @occurrence, @remainder, @portion = *args end def display_name program.display_name end # Extends this scheduled program with another program of the same type. def +( other_program ) raise ArgumentError if @program.class != other_program.class additional_duration = other_program.duration + 1 program.duration += additional_duration occurrence.duration += additional_duration occurrence.end_time += additional_duration self end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
network_executive-0.0.8 | lib/network_executive/scheduled_program.rb |
network_executive-0.0.7 | lib/network_executive/scheduled_program.rb |