Sha256: f85234d615debabe8860c175ea68586459036e69edf8ed9b97e3d5a14716602c

Contents?: true

Size: 533 Bytes

Versions: 8

Compression:

Stored size: 533 Bytes

Contents

require 'erb'

module Spider
    
    class Tag
        
        class << self
            attr_accessor :path
            
            def new_class(path)
                k = Class.new(self)
                k.path = path
                return k
            end
        end
        
        def initialize(el)
            @attributes = el.attributes
            @content = el.innerHTML
        end
        
        def render
            return ERB.new(IO.read(self.class.path)).result(binding)
        end
        
    end
    
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
spiderfw-0.5.7 lib/spiderfw/tag/tag.rb
spiderfw-0.5.6 lib/spiderfw/tag/tag.rb
spiderfw-0.5.5 lib/spiderfw/tag/tag.rb
spiderfw-0.5.4 lib/spiderfw/tag/tag.rb
spiderfw-0.5.3 lib/spiderfw/tag/tag.rb
spiderfw-0.5.2 lib/spiderfw/tag/tag.rb
spiderfw-0.5.1 lib/spiderfw/tag/tag.rb
spiderfw-0.5 lib/spiderfw/tag/tag.rb