Class: RelatonItu::ItuGroup::Period

Inherits:
Object
  • Object
show all
Defined in:
lib/relaton_itu/itu_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start:, finish: nil) ⇒ Period

Returns a new instance of Period.



12
13
14
15
# File 'lib/relaton_itu/itu_group.rb', line 12

def initialize(start:, finish: nil)
  @start = start
  @finish = finish
end

Instance Attribute Details

#finishString, NilClass (readonly)

Returns group period end year.

Returns:

  • (String, NilClass)

    group period end year



8
9
10
# File 'lib/relaton_itu/itu_group.rb', line 8

def finish
  @finish
end

#startString (readonly)

Returns group period start year.

Returns:

  • (String)

    group period start year



5
6
7
# File 'lib/relaton_itu/itu_group.rb', line 5

def start
  @start
end

Instance Method Details

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


18
19
20
21
22
23
# File 'lib/relaton_itu/itu_group.rb', line 18

def to_xml(builder)
  builder.period do
    builder.start start
    builder.end finish if finish
  end
end