Class: Xembly::Set
- Inherits:
-
Object
- Object
- Xembly::Set
- Defined in:
- lib/xembly/set.rb
Overview
SET directive
Instance Method Summary collapse
- #exec(_, cursor) ⇒ Object
-
#initialize(value) ⇒ Set
constructor
Ctor.
Constructor Details
#initialize(value) ⇒ Set
Ctor.
value-
Text value to set
31 32 33 |
# File 'lib/xembly/set.rb', line 31 def initialize(value) @value = value end |
Instance Method Details
#exec(_, cursor) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/xembly/set.rb', line 35 def exec(_, cursor) cursor.each do |node| node.content = Nokogiri::HTML.parse(@value).text Xembly.log.info "node \"#{node.name}\" text content set" end cursor end |