Class: Xembly::Set

Inherits:
Object
  • Object
show all
Defined in:
lib/xembly/set.rb

Overview

SET directive

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Set

Ctor.

value

Text value to set



30
31
32
# File 'lib/xembly/set.rb', line 30

def initialize(value)
  @value = value
end

Instance Method Details

#exec(_, cursor) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/xembly/set.rb', line 34

def exec(_, cursor)
  cursor.each do |node|
    node.content = @value
    Xembly.log.info "node \"#{node.name}\" text content set"
  end
  cursor
end