Class: Citrix::Training::Resource::TrainingDate
- Inherits:
-
Object
- Object
- Citrix::Training::Resource::TrainingDate
- Defined in:
- lib/citrix/training/resource/training_date.rb
Instance Attribute Summary collapse
-
#ends_at ⇒ Object
readonly
The ending datetime.
-
#starts_at ⇒ Object
readonly
The starting datetime.
Instance Method Summary collapse
-
#initialize(starts_at, ends_at) ⇒ TrainingDate
constructor
A new instance of TrainingDate.
- #serialize ⇒ Object
Constructor Details
#initialize(starts_at, ends_at) ⇒ TrainingDate
Returns a new instance of TrainingDate.
11 12 13 14 |
# File 'lib/citrix/training/resource/training_date.rb', line 11 def initialize(starts_at, ends_at) @starts_at = starts_at @ends_at = ends_at end |
Instance Attribute Details
#ends_at ⇒ Object (readonly)
The ending datetime.
9 10 11 |
# File 'lib/citrix/training/resource/training_date.rb', line 9 def ends_at @ends_at end |
#starts_at ⇒ Object (readonly)
The starting datetime.
6 7 8 |
# File 'lib/citrix/training/resource/training_date.rb', line 6 def starts_at @starts_at end |
Instance Method Details
#serialize ⇒ Object
16 17 18 19 20 21 |
# File 'lib/citrix/training/resource/training_date.rb', line 16 def serialize Serializer::TrainingDate.new(attributes: { starts_at: starts_at, ends_at: ends_at }).serialize end |