Class: Spider::Tag
Class Attribute Summary collapse
-
.path ⇒ Object
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(el) ⇒ Tag
constructor
A new instance of Tag.
- #render ⇒ Object
Constructor Details
#initialize(el) ⇒ Tag
Returns a new instance of Tag.
17 18 19 20 |
# File 'lib/spiderfw/tag/tag.rb', line 17 def initialize(el) @attributes = el.attributes.to_hash @content = el.innerHTML end |
Class Attribute Details
.path ⇒ Object
Returns the value of attribute path.
8 9 10 |
# File 'lib/spiderfw/tag/tag.rb', line 8 def path @path end |
Class Method Details
Instance Method Details
#render ⇒ Object
22 23 24 |
# File 'lib/spiderfw/tag/tag.rb', line 22 def render return ERB.new(IO.read(self.class.path)).result(binding) end |