Class: HtmlTag::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/html-tag/globals.rb

Instance Method Summary collapse

Constructor Details

#initialize(scope = nil) ⇒ Proxy

Returns a new instance of Proxy.



22
23
24
# File 'lib/html-tag/globals.rb', line 22

def initialize scope = nil
  @pointer = HtmlTag::Inbound.new scope
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



26
27
28
29
30
# File 'lib/html-tag/globals.rb', line 26

def method_missing name, *args, &block
  @pointer
    .send(name, *args, &block)
    .join('')
end