Class: NDFD::DWML::TimeLayout

Inherits:
Object
  • Object
show all
Defined in:
lib/ndfd/dwml/time_layout.rb

Defined Under Namespace

Classes: ValidTime

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element) ⇒ TimeLayout


12
13
14
15
16
17
18
19
20
# File 'lib/ndfd/dwml/time_layout.rb', line 12

def initialize(element)
  @element = element
  @valid_times = []

  extract_time_coordinate
  extract_summarization
  extract_layout_key
  extract_valid_times
end

Instance Attribute Details

#elementObject (readonly)

Returns the value of attribute element


10
11
12
# File 'lib/ndfd/dwml/time_layout.rb', line 10

def element
  @element
end

#layout_keyObject (readonly)

Returns the value of attribute layout_key


10
11
12
# File 'lib/ndfd/dwml/time_layout.rb', line 10

def layout_key
  @layout_key
end

#summarizationObject (readonly)

Returns the value of attribute summarization


10
11
12
# File 'lib/ndfd/dwml/time_layout.rb', line 10

def summarization
  @summarization
end

#time_coordinateObject (readonly)

Returns the value of attribute time_coordinate


10
11
12
# File 'lib/ndfd/dwml/time_layout.rb', line 10

def time_coordinate
  @time_coordinate
end

#valid_timesObject (readonly)

Returns the value of attribute valid_times


10
11
12
# File 'lib/ndfd/dwml/time_layout.rb', line 10

def valid_times
  @valid_times
end

Class Method Details

.extract(elements) ⇒ Object


5
6
7
# File 'lib/ndfd/dwml/time_layout.rb', line 5

def extract(elements)
  elements.map { |element| new(element) }
end