Class: TraceViz::Models::Box
- Inherits:
-
Object
- Object
- TraceViz::Models::Box
- Defined in:
- lib/trace_viz/models/box.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#participants ⇒ Object
readonly
Returns the value of attribute participants.
Instance Method Summary collapse
- #add_participant(participant) ⇒ Object
-
#initialize(color:, description:) ⇒ Box
constructor
A new instance of Box.
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
#color ⇒ Object (readonly)
Returns the value of attribute color.
6 7 8 |
# File 'lib/trace_viz/models/box.rb', line 6 def color @color end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/trace_viz/models/box.rb', line 6 def description @description end |
#participants ⇒ Object (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 |