Class: CineSync::GroupMovie

Inherits:
MediaBase show all
Defined in:
lib/cinesync/xml.rb,
lib/cinesync/media_file.rb

Instance Attribute Summary collapse

Attributes inherited from MediaBase

#active, #current_frame, #groups, #play_range, #user_data

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(grp) ⇒ GroupMovie

Returns a new instance of GroupMovie.



75
76
77
78
# File 'lib/cinesync/media_file.rb', line 75

def initialize(grp)
  super()
  @group = grp
end

Instance Attribute Details

#groupObject

Returns the value of attribute group.



73
74
75
# File 'lib/cinesync/media_file.rb', line 73

def group
  @group
end

Class Method Details

.load(elem) ⇒ Object



186
187
188
189
190
191
# File 'lib/cinesync/xml.rb', line 186

def self.load(elem)
  group = elem.elements['groupMovie/group'].text
  returning self.new(group) do |m|
    common_load(elem, m)
  end
end

Instance Method Details

#to_xml(x) ⇒ Object

eMedia |= element media {

# Group movie
MediaBase &
element groupMovie { eGroup } }


177
178
179
180
181
182
183
# File 'lib/cinesync/xml.rb', line 177

def to_xml(x)
  super(x) do |x|
    x.groupMovie {
      x.group(group)
    }
  end
end

#uses_pro_features?Boolean

Returns:

  • (Boolean)


80
81
82
# File 'lib/cinesync/media_file.rb', line 80

def uses_pro_features?
  true
end

#valid?Boolean

Returns:

  • (Boolean)


84
85
86
# File 'lib/cinesync/media_file.rb', line 84

def valid?
  super and group and not group.empty?
end