Class: SiSU_JSONutils::Clean

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/json_shared.rb

Instance Method Summary collapse

Constructor Details

#initialize(para = '') ⇒ Clean

Returns a new instance of Clean.



58
59
60
61
62
63
# File 'lib/sisu/json_shared.rb', line 58

def initialize(para='')
  @para=para
  #@para,@n_char_max,@n_indent,@post,=para,n_char_max,n_indent,post
  #@n_char_max_extend = n_char_max
  #@n_hang=n_hang ? n_hang : @n_indent
end

Instance Method Details

#line_json_cleanObject

@para,@n_char_max,@n_indent,@post,=para,n_char_max,n_indent,post @n_hang=n_hang ? n_hang : @n_indent



64
65
66
67
68
69
70
# File 'lib/sisu/json_shared.rb', line 64

def line_json_clean
  @para=@para.gsub(/<br>/,' \\ ').
    gsub(/#{Mx[:br_nl]}/,"\n\n").
    gsub(/"/,'\"').
    gsub(/'/,"\\\\'")
  @para
end