Class: Matterhorn::Smil::Scene
- Defined in:
- lib/matterhorn/smil.rb
Overview
Matterhorn::Smil::Scene ===
Instance Attribute Summary collapse
-
#clip_begin ⇒ Object
readonly
Returns the value of attribute clip_begin.
-
#clip_end ⇒ Object
readonly
Returns the value of attribute clip_end.
Attributes inherited from Element
#duration, #end_point, #parent, #rel_begin, #start_point
Instance Method Summary collapse
-
#initialize(parent, file, clip_begin, clip_end) ⇒ Scene
constructor
————————————————————————— initialization —.
-
#propagate(parent_elem) ⇒ Object
——————————————————————————— methodes —.
- #to_xml(bx) ⇒ Object
Methods inherited from Element
Constructor Details
#initialize(parent, file, clip_begin, clip_end) ⇒ Scene
————————————————————————— initialization —
387 388 389 390 391 392 |
# File 'lib/matterhorn/smil.rb', line 387 def initialize(parent, file, clip_begin, clip_end) super(parent) @src = file @clip_begin = clip_begin @clip_end = clip_end end |
Instance Attribute Details
#clip_begin ⇒ Object (readonly)
Returns the value of attribute clip_begin.
383 384 385 |
# File 'lib/matterhorn/smil.rb', line 383 def clip_begin @clip_begin end |
#clip_end ⇒ Object (readonly)
Returns the value of attribute clip_end.
383 384 385 |
# File 'lib/matterhorn/smil.rb', line 383 def clip_end @clip_end end |
Instance Method Details
#propagate(parent_elem) ⇒ Object
——————————————————————————— methodes —
397 398 |
# File 'lib/matterhorn/smil.rb', line 397 def propagate(parent_elem) end |
#to_xml(bx) ⇒ Object
401 402 403 404 405 406 407 |
# File 'lib/matterhorn/smil.rb', line 401 def to_xml(bx) attributes = Hash.new attributes[:src] = @src.to_s attributes[:clipBegin] = "#{(@clip_begin * 1000).round.to_s}ms" attributes[:clipEnd] = "#{(@clip_end * 1000).round.to_s}ms" bx.video(attributes) end |