Module: Duxml::NewText

Included in:
NewTextClass
Defined in:
lib/duxml/meta/history/new_text.rb,
lib/duxml/meta/history/new_text.rb

Instance Method Summary collapse

Instance Method Details

#descriptionString

Returns self description.

Returns:

  • (String)

    self description



29
30
31
# File 'lib/duxml/meta/history/new_text.rb', line 29

def description
  "#{super} #{subject.description} given new text '#{text}'."
end

#line_exprObject



33
34
35
# File 'lib/duxml/meta/history/new_text.rb', line 33

def line_expr
  subject.line < 0 ? '' : " on line #{subject.line}"
end

#textObject Also known as: object



23
24
25
# File 'lib/duxml/meta/history/new_text.rb', line 23

def text
  subject.nodes[index]
end