class FourCC
Public Class Methods
new(value=" ")
click to toggle source
A FOURCC is represented as a sequence of one to four ASCII alphanumeric characters, padded on the right with blank characters (ASCII character value 32) as required, with no embedded blanks (i.e. “H DL” invalid).
# File lib/four_cc.rb, line 8 def initialize(value=" ") begin raise "FourCC invalid." unless FourCC.verify(value) self.value = value rescue end end
Private Class Methods
verify(value)
click to toggle source
# File lib/four_cc.rb, line 25 def self.verify(value) valid = true return false unless valid return true end
Public Instance Methods
to_s()
click to toggle source
# File lib/four_cc.rb, line 19 def to_s self.value end