Module: MkvToolNix::Extensions::Iterable

Overview

offers iterable methods

Instance Method Summary collapse

Instance Method Details

#all_propertiesArray<Property>

Returns all constant values if sorted order

Returns:

  • (Array<Property>)

    returns all constant values if sorted order



9
10
11
# File 'lib/mkvtoolnix/extensions/iterable.rb', line 9

def all_properties
  constants.map { |it| const_get(it) }.sort! { |a, b| a.property <=> b.property }
end

#find_property(property_name) ⇒ Object



13
14
15
# File 'lib/mkvtoolnix/extensions/iterable.rb', line 13

def find_property(property_name)
  all_properties.find { |it| it.property == property_name }
end