Class: DWML::TimeLayout
- Inherits:
-
Object
- Object
- DWML::TimeLayout
- Defined in:
- lib/dwml/time_layout.rb
Defined Under Namespace
Classes: ValidTime
Instance Attribute Summary collapse
-
#element ⇒ Object
readonly
Returns the value of attribute element.
-
#layout_key ⇒ Object
readonly
Returns the value of attribute layout_key.
-
#summarization ⇒ Object
readonly
Returns the value of attribute summarization.
-
#time_coordinate ⇒ Object
readonly
Returns the value of attribute time_coordinate.
-
#valid_times ⇒ Object
readonly
Returns the value of attribute valid_times.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(element) ⇒ TimeLayout
constructor
A new instance of TimeLayout.
Constructor Details
#initialize(element) ⇒ TimeLayout
Returns a new instance of TimeLayout.
11 12 13 14 15 16 17 18 19 |
# File 'lib/dwml/time_layout.rb', line 11 def initialize(element) @element = element @valid_times = [] extract_time_coordinate extract_summarization extract_layout_key extract_valid_times end |
Instance Attribute Details
#element ⇒ Object (readonly)
Returns the value of attribute element.
9 10 11 |
# File 'lib/dwml/time_layout.rb', line 9 def element @element end |
#layout_key ⇒ Object (readonly)
Returns the value of attribute layout_key.
9 10 11 |
# File 'lib/dwml/time_layout.rb', line 9 def layout_key @layout_key end |
#summarization ⇒ Object (readonly)
Returns the value of attribute summarization.
9 10 11 |
# File 'lib/dwml/time_layout.rb', line 9 def summarization @summarization end |
#time_coordinate ⇒ Object (readonly)
Returns the value of attribute time_coordinate.
9 10 11 |
# File 'lib/dwml/time_layout.rb', line 9 def time_coordinate @time_coordinate end |
#valid_times ⇒ Object (readonly)
Returns the value of attribute valid_times.
9 10 11 |
# File 'lib/dwml/time_layout.rb', line 9 def valid_times @valid_times end |
Class Method Details
.extract(elements) ⇒ Object
4 5 6 |
# File 'lib/dwml/time_layout.rb', line 4 def extract(elements) elements.map { |element| new(element) } end |