Module: Hornetseye::FrameConstructor

Included in:
Frame
Defined in:
docs/hornetseye-frame/lib/hornetseye-frame/shortcuts.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'docs/hornetseye-frame/lib/hornetseye-frame/shortcuts.rb', line 22

def method_missing( name, *args )
  if name.to_s =~ /^[a-z0-9]+$/
    target = name.to_s.upcase
    if Hornetseye.const_defined? target
      target = Hornetseye.const_get target
      if target.is_a? FourCC
        new target, *args
      else
        super name, *args
      end
    else
      super name, *args
    end
  else
    super name, *args
  end
end