Class: Citrix::Training::Resource::TrainingDate

Inherits:
Object
  • Object
show all
Defined in:
lib/citrix/training/resource/training_date.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject (readonly)

The ending datetime.



9
10
11
# File 'lib/citrix/training/resource/training_date.rb', line 9

def ends_at
  @ends_at
end

#starts_atObject (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

#serializeObject



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