Class: Opsgenie::TimelineRotation
- Inherits:
-
Object
- Object
- Opsgenie::TimelineRotation
- Defined in:
- lib/opsgenie/timeline_rotation.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#periods ⇒ Object
readonly
Returns the value of attribute periods.
Instance Method Summary collapse
-
#initialize(id:, name:, periods:) ⇒ TimelineRotation
constructor
A new instance of TimelineRotation.
Constructor Details
#initialize(id:, name:, periods:) ⇒ TimelineRotation
Returns a new instance of TimelineRotation.
5 6 7 8 9 |
# File 'lib/opsgenie/timeline_rotation.rb', line 5 def initialize(id:, name:, periods:) @id = id @name = name @periods = periods.map { |p| TimelinePeriod.new(p) } end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/opsgenie/timeline_rotation.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/opsgenie/timeline_rotation.rb', line 3 def name @name end |
#periods ⇒ Object (readonly)
Returns the value of attribute periods.
3 4 5 |
# File 'lib/opsgenie/timeline_rotation.rb', line 3 def periods @periods end |