Class: PFA::RelativePFA::DataTime
- Inherits:
-
Object
- Object
- PFA::RelativePFA::DataTime
- Includes:
- PFAElementModule
- Defined in:
- lib/pfa/relative_pfa_datatime.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#pfa ⇒ Object
readonly
Returns the value of attribute pfa.
Instance Method Summary collapse
-
#initialize(pfa, key, value = nil) ⇒ DataTime
constructor
A new instance of DataTime.
- #time ⇒ Object (also: #start_at)
-
#type ⇒ Object
Pour la compatibilité quand on boucle sur tous les éléments des données du paradigme relatif.
Methods included from PFAElementModule
#abs_data, #drawnable?, #part?, #printable?
Constructor Details
#initialize(pfa, key, value = nil) ⇒ DataTime
Returns a new instance of DataTime.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/pfa/relative_pfa_datatime.rb', line 19 def initialize(pfa, key, value = nil) @pfa = pfa @key = key @ini_value = value case value when Hash @horloge = value[:t]||value[:time]||value[:horloge] @description = value[:d]||value[:description] else @horloge = value end end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
8 9 10 |
# File 'lib/pfa/relative_pfa_datatime.rb', line 8 def key @key end |
#pfa ⇒ Object (readonly)
Returns the value of attribute pfa.
8 9 10 |
# File 'lib/pfa/relative_pfa_datatime.rb', line 8 def pfa @pfa end |
Instance Method Details
#time ⇒ Object Also known as: start_at
32 33 34 |
# File 'lib/pfa/relative_pfa_datatime.rb', line 32 def time @time ||= PFA::NTime.new(@horloge, 0) end |
#type ⇒ Object
Pour la compatibilité quand on boucle sur tous les éléments des données du paradigme relatif
39 |
# File 'lib/pfa/relative_pfa_datatime.rb', line 39 def type; nil end |