Class: Hornetseye::FourCC

Inherits:
Object show all
Defined in:
docs/hornetseye-frame/lib/hornetseye-frame/fourcc.rb

Instance Method Summary collapse

Constructor Details

#initialize(a, b, c, d = nil) ⇒ FourCC

Returns a new instance of FourCC.



22
23
24
# File 'docs/hornetseye-frame/lib/hornetseye-frame/fourcc.rb', line 22

def initialize(a, b, c, d = nil)
  @a, @b, @c, @d = a, b, c, d
end

Instance Method Details

#==(other) ⇒ Object



42
43
44
# File 'docs/hornetseye-frame/lib/hornetseye-frame/fourcc.rb', line 42

def ==( other )
  ( other.is_a? FourCC ) and ( other.inspect == inspect )
end

#inspectObject



26
27
28
# File 'docs/hornetseye-frame/lib/hornetseye-frame/fourcc.rb', line 26

def inspect
  to_s
end

#rgb?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'docs/hornetseye-frame/lib/hornetseye-frame/fourcc.rb', line 38

def rgb?
  true
end

#to_sObject



30
31
32
# File 'docs/hornetseye-frame/lib/hornetseye-frame/fourcc.rb', line 30

def to_s
  "#{@a}#{@b}#{@c}#{@d ? @d : ''}"
end

#to_strObject



34
35
36
# File 'docs/hornetseye-frame/lib/hornetseye-frame/fourcc.rb', line 34

def to_str
  to_s
end