Class: AnimateIt::Chapter
- Inherits:
-
Data
- Object
- Data
- AnimateIt::Chapter
- Defined in:
- lib/animate_it/chapters.rb
Instance Attribute Summary collapse
-
#beat_name ⇒ Object
readonly
Returns the value of attribute beat_name.
-
#duration_frames ⇒ Object
readonly
Returns the value of attribute duration_frames.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#start_frame ⇒ Object
readonly
Returns the value of attribute start_frame.
Instance Method Summary collapse
Instance Attribute Details
#beat_name ⇒ Object (readonly)
Returns the value of attribute beat_name
4 5 6 |
# File 'lib/animate_it/chapters.rb', line 4 def beat_name @beat_name end |
#duration_frames ⇒ Object (readonly)
Returns the value of attribute duration_frames
4 5 6 |
# File 'lib/animate_it/chapters.rb', line 4 def duration_frames @duration_frames end |
#label ⇒ Object (readonly)
Returns the value of attribute label
4 5 6 |
# File 'lib/animate_it/chapters.rb', line 4 def label @label end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata
4 5 6 |
# File 'lib/animate_it/chapters.rb', line 4 def @metadata end |
#name ⇒ Object (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/animate_it/chapters.rb', line 4 def name @name end |
#start_frame ⇒ Object (readonly)
Returns the value of attribute start_frame
4 5 6 |
# File 'lib/animate_it/chapters.rb', line 4 def start_frame @start_frame end |
Instance Method Details
#as_json ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/animate_it/chapters.rb', line 9 def as_json(*) { "name" => name.to_s, "label" => label, "beat" => beat_name.to_s, "startFrame" => start_frame, "durationFrames" => duration_frames, "endFrame" => end_frame, "metadata" => } end |
#end_frame ⇒ Object
5 6 7 |
# File 'lib/animate_it/chapters.rb', line 5 def end_frame start_frame + duration_frames end |