Class: Opsgenie::TimelinePeriod
- Inherits:
-
Object
- Object
- Opsgenie::TimelinePeriod
- Defined in:
- lib/opsgenie/timeline_period.rb
Instance Attribute Summary collapse
-
#end_date ⇒ Object
readonly
Returns the value of attribute end_date.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ TimelinePeriod
constructor
A new instance of TimelinePeriod.
Constructor Details
#initialize(attrs) ⇒ TimelinePeriod
Returns a new instance of TimelinePeriod.
4 5 6 7 8 |
# File 'lib/opsgenie/timeline_period.rb', line 4 def initialize(attrs) @start_date = DateTime.parse(attrs["startDate"]) @end_date = DateTime.parse(attrs["endDate"]) @user = Opsgenie::User.find(attrs["recipient"]["id"]) end |
Instance Attribute Details
#end_date ⇒ Object (readonly)
Returns the value of attribute end_date.
3 4 5 |
# File 'lib/opsgenie/timeline_period.rb', line 3 def end_date @end_date end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
3 4 5 |
# File 'lib/opsgenie/timeline_period.rb', line 3 def start_date @start_date end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'lib/opsgenie/timeline_period.rb', line 3 def user @user end |