Class: Media::Container
- Inherits:
-
Object
- Object
- Media::Container
- Defined in:
- lib/media/container.rb
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(args) ⇒ Container
constructor
A new instance of Container.
- #streams(args = {}) ⇒ Object
Constructor Details
Instance Method Details
#format ⇒ Object
14 15 16 |
# File 'lib/media/container.rb', line 14 def format OpenStruct.new(['format']) end |
#streams(args = {}) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/media/container.rb', line 18 def streams(args={}) type = args.fetch(:type, /.*/) ['streams'].select {|s| s['codec_type'].match(type)}. map {|s| OpenStruct.new(s)} end |