Sha256: 5bea4363abf71a4fa2a00fd9428bdb4ef5adef1aa16d7e937923f0624613e8d6

Contents?: true

Size: 371 Bytes

Versions: 2

Compression:

Stored size: 371 Bytes

Contents

class IrwiMod::Comparators::Spans::ChangedSpan

  attr_accessor :action, :old_value, :new_value

  def initialize( act, ov, nv )
    @action = act
    @old_value = ov
    @new_value = nv
  end

  def to_s
    s = ''
    s << "<span class=\"removed\">#{@old_value}</span>" if @old_value
    s << "<span class=\"added\">#{@new_value}</span>" if @new_value
    s
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
irwi_mod-0.0.2 lib/irwi_mod/comparators/spans/changed_span.rb
irwi_mod-0.0.1 lib/irwi_mod/comparators/spans/changed_span.rb