module SpanExtension

Constants

BLANKS

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/epsagon.rb, line 158
def initialize(*args)
  super(*args)
  if @attributes
    @attributes = Hash[@attributes.select {|k,v| not BLANKS.include? v}.map { |k,v|
      v = Util.prepare_attr(k, v, Epsagon.get_config[:max_attribute_size], Epsagon.get_config[:ignored_keys])
      [k, v] if v
    }.compact]
  end
end

Public Instance Methods

set_attribute(key, value) click to toggle source
Calls superclass method
# File lib/epsagon.rb, line 151
def set_attribute(key, value)
  unless BLANKS.include?(value)
    value = Util.prepare_attr(key, value, Epsagon.get_config[:max_attribute_size], Epsagon.get_config[:ignored_keys])
    super(key, value) if value
  end
end
set_mapping_attribute(key, value) click to toggle source
# File lib/epsagon.rb, line 146
def set_mapping_attribute(key, value)
  value = Util.prepare_attr(key, value, Epsagon.get_config[:max_attribute_size], Epsagon.get_config[:ignored_keys])
  set_attribute(key, value) if value
end