Class: TraceViz::Models::Box

Inherits:
Object
  • Object
show all
Defined in:
lib/trace_viz/models/box.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(color:, description:) ⇒ Box

Returns a new instance of Box.



8
9
10
11
12
# File 'lib/trace_viz/models/box.rb', line 8

def initialize(color:, description:)
  @color = color
  @description = description
  @participants = []
end

Instance Attribute Details

#colorObject (readonly)

Returns the value of attribute color.



6
7
8
# File 'lib/trace_viz/models/box.rb', line 6

def color
  @color
end

#descriptionObject (readonly)

Returns the value of attribute description.



6
7
8
# File 'lib/trace_viz/models/box.rb', line 6

def description
  @description
end

#participantsObject (readonly)

Returns the value of attribute participants.



6
7
8
# File 'lib/trace_viz/models/box.rb', line 6

def participants
  @participants
end

Instance Method Details

#add_participant(participant) ⇒ Object



14
15
16
# File 'lib/trace_viz/models/box.rb', line 14

def add_participant(participant)
  @participants << participant
end