asip-meteor 0.9.1.9 → 0.9.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/meteor.rb +194 -189
  2. metadata +2 -2
data/lib/meteor.rb CHANGED
@@ -18,20 +18,18 @@
18
18
  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
19
  #
20
20
  # @author Yasumasa Ashida
21
- # @version 0.9.1.9
21
+ # @version 0.9.2.0
22
22
  #
23
23
 
24
+ module Meteor
24
25
 
25
- RUBY_VERSION_1_9_0 = '1.9.0'
26
-
27
- if RUBY_VERSION < RUBY_VERSION_1_9_0 then
28
- require 'Kconv'
29
- end
26
+ VERSION = "0.9.2.0"
30
27
 
28
+ RUBY_VERSION_1_9_0 = '1.9.0'
31
29
 
32
- module Meteor
33
-
34
- VERSION = "0.9.1.9"
30
+ if RUBY_VERSION < RUBY_VERSION_1_9_0 then
31
+ require 'Kconv'
32
+ end
35
33
 
36
34
  ZERO = 0
37
35
  ONE = 1
@@ -197,7 +195,6 @@ module Meteor
197
195
  @parser.content(self,value)
198
196
  end
199
197
 
200
-
201
198
  #
202
199
  # 属性を編集するor内容をセットする
203
200
  #
@@ -249,6 +246,14 @@ module Meteor
249
246
  def flush
250
247
  @parser.flush
251
248
  end
249
+
250
+ #
251
+ # フッククラスの処理を実行する
252
+ # @param [Array] args 引数配列
253
+ #
254
+ def execute(*args)
255
+ @parser.execute(self,*args)
256
+ end
252
257
 
253
258
  end
254
259
 
@@ -590,16 +595,16 @@ module Meteor
590
595
  def initialize
591
596
  end
592
597
 
593
- def do_action(elm,pif)
598
+ def do_action(elm)
594
599
  #内容あり要素の場合
595
600
  if elm.empty then
596
- pif2 = pif.child(elm)
597
- execute(pif2)
598
- pif2.flush
601
+ elm2 = elm.child(elm)
602
+ execute(elm2)
603
+ elm2.flush
599
604
  end
600
605
  end
601
606
 
602
- def execute(pif)
607
+ def execute(elm)
603
608
  end
604
609
  end
605
610
 
@@ -614,23 +619,23 @@ module Meteor
614
619
  def initialize
615
620
  end
616
621
 
617
- def do_action(elm,ps,list)
622
+ def do_action(elm,list)
618
623
  #内容あり要素の場合
619
624
  if elm.empty then
620
- pif2 = ps.child(elm)
621
- init(pif2)
625
+ elm2 = elm.child(elm)
626
+ init(elm2)
622
627
  list.each do |item|
623
- if pif2.root_element.element && !pif2.root_element.element.mono then
624
- pif2.root_element.document = elm.mixed_content
628
+ if !elm2.mono then
629
+ elm2.parser.root_element.document = elm.mixed_content
625
630
  end
626
- execute(pif2.root_element.mutable_element, item)
627
- pif2.print
631
+ execute(elm2, item)
632
+ elm2.print
628
633
  end
629
- pif2.flush
634
+ elm2.flush
630
635
  end
631
636
  end
632
637
 
633
- def init(ps)
638
+ def init(elm)
634
639
  end
635
640
  private :init
636
641
 
@@ -2434,17 +2439,17 @@ module Meteor
2434
2439
  end
2435
2440
  private :shadow
2436
2441
 
2437
- #
2438
- # 子パーサを取得する
2439
- #
2440
- # @param [Meteor::Element] elm 要素
2441
- # @return [Meteor::Parser] 子パーサ
2442
- #
2443
- def child(elm)
2444
- if shadow(elm) then
2445
- @elm_.parser
2446
- end
2447
- end
2442
+ ##
2443
+ ## 子パーサを取得する
2444
+ ##
2445
+ ## @param [Meteor::Element] elm 要素
2446
+ ## @return [Meteor::Parser] 子パーサ
2447
+ ##
2448
+ #def child(elm)
2449
+ # if shadow(elm) then
2450
+ # @elm_.parser
2451
+ # end
2452
+ #end
2448
2453
 
2449
2454
  def set_mono_info(elm)
2450
2455
  end
@@ -2459,28 +2464,29 @@ module Meteor
2459
2464
  @root.element.origin.parser.replace(@root.element.origin, @root.hook_document)
2460
2465
  end
2461
2466
  end
2462
-
2463
- #
2467
+
2464
2468
  #
2469
+ # フッククラスの処理を実行する
2470
+ # @param [Array] args 引数配列
2465
2471
  #
2466
2472
  def execute(*args)
2467
2473
  case args.length
2468
- when ONE
2469
- execute_2(args[0],args[1])
2470
2474
  when TWO
2475
+ execute_2(args[0],args[1])
2476
+ when THREE
2471
2477
  execute_3(args[0],args[1],args[2])
2472
2478
  else
2473
2479
  raise ArgumentError
2474
2480
  end
2475
2481
  end
2476
-
2482
+
2477
2483
  def execute_2(elm,hook)
2478
- hook.do_action(elm, self)
2484
+ hook.do_action(elm)
2479
2485
  end
2480
2486
  private :execute_2
2481
2487
 
2482
2488
  def execute_3(elm,loop,list)
2483
- loop.do_action(elm, self, list)
2489
+ loop.do_action(elm,list)
2484
2490
  end
2485
2491
  private :execute_3
2486
2492
 
@@ -2495,55 +2501,55 @@ module Meteor
2495
2501
  end
2496
2502
  private :escape_regex
2497
2503
 
2498
- def replace2regex(element)
2499
- if element.include?(EN_1) then
2500
- element.gsub!(@@pattern_sub_regex1,SUB_REGEX2)
2504
+ def replace2regex(str)
2505
+ if str.include?(EN_1) then
2506
+ str.gsub!(@@pattern_sub_regex1,SUB_REGEX2)
2501
2507
  end
2502
2508
  end
2503
2509
  private :replace2regex
2504
2510
 
2505
- def replace4regex(element)
2506
- if element.include?(EN_1) then
2507
- element.gsub!(@@pattern_sub_regex1,SUB_REGEX3)
2511
+ def replace4regex(str)
2512
+ if str.include?(EN_1) then
2513
+ str.gsub!(@@pattern_sub_regex1,SUB_REGEX3)
2508
2514
  end
2509
2515
  end
2510
2516
  private :replace4regex
2511
2517
 
2512
2518
  #
2513
- # @param [String] element 入力文字列
2519
+ # @param [String] content 入力文字列
2514
2520
  # @return [String] 出力文字列
2515
2521
  #
2516
- def escape(element)
2517
- element;
2522
+ def escape(content)
2523
+ content
2518
2524
  end
2519
2525
  private :escape
2520
2526
 
2521
2527
  #
2522
- # @param [String] element 入力文字列
2528
+ # @param [String] content 入力文字列
2523
2529
  # @param [String] elm_name 要素名
2524
2530
  # @return [String] 出力文字列
2525
2531
  #
2526
- def escape_content(element,elm_name)
2527
- element
2532
+ def escape_content(content,elm_name)
2533
+ content
2528
2534
  end
2529
2535
  private :escape_content
2530
2536
 
2531
2537
  #
2532
- # @param [String] element 入力文字列
2538
+ # @param [String] content 入力文字列
2533
2539
  # @return [String] 出力文字列
2534
2540
  #
2535
- def unescape(element)
2536
- element;
2541
+ def unescape(content)
2542
+ content
2537
2543
  end
2538
2544
  private :unescape
2539
2545
 
2540
2546
  #
2541
- # @param [String] element 入力文字列
2547
+ # @param [String] content 入力文字列
2542
2548
  # @param [String] elm_name 要素名
2543
2549
  # @return [String] 出力文字列
2544
2550
  #
2545
- def unescape_content(element,elm_name)
2546
- element;
2551
+ def unescape_content(content,elm_name)
2552
+ content
2547
2553
  end
2548
2554
  private :unescape_content
2549
2555
 
@@ -2574,7 +2580,6 @@ module Meteor
2574
2580
  end
2575
2581
  private :is_match
2576
2582
 
2577
-
2578
2583
  def create(pif)
2579
2584
  if pif.instance_of?(Meteor::Core::Html::ParserImpl) then
2580
2585
  pif = Meteor::Core::Html::ParserImpl.new
@@ -2589,31 +2594,31 @@ module Meteor
2589
2594
  end
2590
2595
  private :create
2591
2596
 
2597
+ ##
2598
+ ## 要素の属性or内容をセットする
2599
+ ## @param [String] name 属性名
2600
+ ## @param [String] value 属性値or内容
2601
+ ##
2602
+ #def []=(name,value)
2603
+ # if !name.kind_of?(String)|| name != CONTENT_STR then
2604
+ # attribute(name,value)
2605
+ # else
2606
+ # content(value)
2607
+ # end
2608
+ #end
2592
2609
  #
2593
- # 要素の属性or内容をセットする
2594
- # @param [String] name 属性名
2595
- # @param [String] value 属性値or内容
2596
- #
2597
- def []=(name,value)
2598
- if !name.kind_of?(String)|| name != CONTENT_STR then
2599
- attribute(name,value)
2600
- else
2601
- content(value)
2602
- end
2603
- end
2604
-
2605
- #
2606
- # 要素の属性値or内容を取得する
2607
- # @param [String] name 属性名
2608
- # @return [String] 属性値or内容
2609
- #
2610
- def [](name)
2611
- if !name.kind_of?(String)|| name != CONTENT_STR then
2612
- attribute(name)
2613
- else
2614
- content()
2615
- end
2616
- end
2610
+ ##
2611
+ ## 要素の属性値or内容を取得する
2612
+ ## @param [String] name 属性名
2613
+ ## @return [String] 属性値or内容
2614
+ ##
2615
+ #def [](name)
2616
+ # if !name.kind_of?(String)|| name != CONTENT_STR then
2617
+ # attribute(name)
2618
+ # else
2619
+ # content()
2620
+ # end
2621
+ #end
2617
2622
  end
2618
2623
 
2619
2624
  module Util
@@ -3442,75 +3447,75 @@ module Meteor
3442
3447
  end
3443
3448
  private :set_mono_info
3444
3449
 
3445
- def escape(element)
3450
+ def escape(content)
3446
3451
  #特殊文字の置換
3447
3452
  if RUBY_VERSION < RUBY_VERSION_1_9_0 then
3448
3453
  #「&」->「&amp;」
3449
- if element.include?(AND_1) then
3450
- element.gsub!(@@pattern_and_1,AND_2)
3454
+ if content.include?(AND_1) then
3455
+ content.gsub!(@@pattern_and_1,AND_2)
3451
3456
  end
3452
3457
  #「<」->「&lt;」
3453
- if element.include?(LT_1) then
3454
- element.gsub!(@@pattern_lt_1,LT_2)
3458
+ if content.include?(LT_1) then
3459
+ content.gsub!(@@pattern_lt_1,LT_2)
3455
3460
  end
3456
3461
  #「>」->「&gt;」
3457
- if element.include?(GT_1) then
3458
- element.gsub!(@@pattern_gt_1,GT_2)
3462
+ if content.include?(GT_1) then
3463
+ content.gsub!(@@pattern_gt_1,GT_2)
3459
3464
  end
3460
3465
  #「"」->「&quotl」
3461
- if element.include?(DOUBLE_QUATATION) then
3462
- element.gsub!(@@pattern_dq_1,QO_2)
3466
+ if content.include?(DOUBLE_QUATATION) then
3467
+ content.gsub!(@@pattern_dq_1,QO_2)
3463
3468
  end
3464
3469
  #「 」->「&nbsp;」
3465
- if element.include?(SPACE) then
3466
- element.gsub!(@@pattern_space_1,NBSP_2)
3470
+ if content.include?(SPACE) then
3471
+ content.gsub!(@@pattern_space_1,NBSP_2)
3467
3472
  end
3468
3473
  else
3469
- element.gsub!(@@pattern_escape, TABLE_FOR_ESCAPE_)
3474
+ content.gsub!(@@pattern_escape, TABLE_FOR_ESCAPE_)
3470
3475
  end
3471
- element
3476
+ content
3472
3477
  end
3473
3478
  private :escape
3474
3479
 
3475
- def escape_content(element,elm_name)
3480
+ def escape_content(content,elm_name)
3476
3481
  if RUBY_VERSION < RUBY_VERSION_1_9_0 then
3477
- element = escape(element)
3482
+ content = escape(content)
3478
3483
 
3479
3484
  if !is_match(MATCH_TAG_2,elm_name) then
3480
3485
  #「¥r?¥n」->「<br>」
3481
- element.gsub!(@@pattern_br_1, BR_2)
3486
+ content.gsub!(@@pattern_br_1, BR_2)
3482
3487
  end
3483
3488
  else
3484
- element.gsub!(@@pattern_escape_content, TABLE_FOR_ESCAPE_CONTENT_)
3489
+ content.gsub!(@@pattern_escape_content, TABLE_FOR_ESCAPE_CONTENT_)
3485
3490
  end
3486
3491
 
3487
- element
3492
+ content
3488
3493
  end
3489
3494
  private :escape_content
3490
3495
 
3491
- def unescape(element)
3496
+ def unescape(content)
3492
3497
  #特殊文字の置換
3493
3498
  #「<」<-「&lt;」
3494
- #if element.include?(LT_2) then
3495
- # element.gsub!(@@pattern_lt_2,LT_1)
3499
+ #if content.include?(LT_2) then
3500
+ # content.gsub!(@@pattern_lt_2,LT_1)
3496
3501
  #end
3497
3502
  #「>」<-「&gt;」
3498
- #if element.include?(GT_2) then
3499
- # element.gsub!(@@pattern_gt_2,GT_1)
3503
+ #if content.include?(GT_2) then
3504
+ # content.gsub!(@@pattern_gt_2,GT_1)
3500
3505
  #end
3501
3506
  #「"」<-「&quotl」
3502
- #if element.include?(QO_2) then
3503
- # element.gsub!(@@pattern_dq_2,DOUBLE_QUATATION)
3507
+ #if content.include?(QO_2) then
3508
+ # content.gsub!(@@pattern_dq_2,DOUBLE_QUATATION)
3504
3509
  #end
3505
3510
  #「 」<-「&nbsp;」
3506
- #if element.include?(NBSP_2) then
3507
- # element.gsub!(@@pattern_space_2,SPACE)
3511
+ #if content.include?(NBSP_2) then
3512
+ # content.gsub!(@@pattern_space_2,SPACE)
3508
3513
  #end
3509
3514
  #「&」<-「&amp;」
3510
- #if element.include?(AND_2) then
3511
- # element.gsub!(@@pattern_and_2,AND_1)
3515
+ #if content.include?(AND_2) then
3516
+ # content.gsub!(@@pattern_and_2,AND_1)
3512
3517
  #end
3513
- element.gsub!(@@pattern_unescape) do
3518
+ content.gsub!(@@pattern_unescape) do
3514
3519
  case $1
3515
3520
  when AND_3 then
3516
3521
  AND_1
@@ -3527,21 +3532,21 @@ module Meteor
3527
3532
  end
3528
3533
  end
3529
3534
 
3530
- element
3535
+ content
3531
3536
  end
3532
3537
  private :unescape
3533
3538
 
3534
- def unescape_content(element,elm_name)
3535
- element = unescape(element)
3539
+ def unescape_content(content,elm_name)
3540
+ content = unescape(content)
3536
3541
 
3537
3542
  if !is_match(MATCH_TAG_2,elm_name) then
3538
3543
  #「<br>」->「¥r?¥n」
3539
- if element.include?(BR_2) then
3540
- element.gsub!(@@pattern_br_2, @root.kaigyo_code)
3544
+ if content.include?(BR_2) then
3545
+ content.gsub!(@@pattern_br_2, @root.kaigyo_code)
3541
3546
  end
3542
3547
  end
3543
3548
 
3544
- element
3549
+ content
3545
3550
  end
3546
3551
  private :unescape_content
3547
3552
 
@@ -3959,80 +3964,80 @@ module Meteor
3959
3964
  end
3960
3965
  private :set_mono_info
3961
3966
 
3962
- def escape(element)
3967
+ def escape(content)
3963
3968
  #特殊文字の置換
3964
3969
  if RUBY_VERSION < RUBY_VERSION_1_9_0 then
3965
3970
  #「&」->「&amp;」
3966
- if element.include?(AND_1) then
3967
- element.gsub!(@@pattern_and_1,AND_2)
3971
+ if content.include?(AND_1) then
3972
+ content.gsub!(@@pattern_and_1,AND_2)
3968
3973
  end
3969
3974
  #「<」->「&lt;」
3970
- if element.include?(LT_1) then
3971
- element.gsub!(@@pattern_lt_1,LT_2)
3975
+ if content.include?(LT_1) then
3976
+ content.gsub!(@@pattern_lt_1,LT_2)
3972
3977
  end
3973
3978
  #「>」->「&gt;」
3974
- if element.include?(GT_1) then
3975
- element.gsub!(@@pattern_gt_1,GT_2)
3979
+ if content.include?(GT_1) then
3980
+ content.gsub!(@@pattern_gt_1,GT_2)
3976
3981
  end
3977
3982
  #「"」->「&quotl」
3978
- if element.include?(DOUBLE_QUATATION) then
3979
- element.gsub!(@@pattern_dq_1,QO_2)
3983
+ if content.include?(DOUBLE_QUATATION) then
3984
+ content.gsub!(@@pattern_dq_1,QO_2)
3980
3985
  end
3981
3986
  #「'」->「&apos;」
3982
- if element.include?(AP_1) then
3983
- element.gsub!(@@pattern_ap_1,AP_2)
3987
+ if content.include?(AP_1) then
3988
+ content.gsub!(@@pattern_ap_1,AP_2)
3984
3989
  end
3985
3990
  #「 」->「&nbsp;」
3986
- if element.include?(SPACE) then
3987
- element.gsub!(@@pattern_space_1,NBSP_2)
3991
+ if content.include?(SPACE) then
3992
+ content.gsub!(@@pattern_space_1,NBSP_2)
3988
3993
  end
3989
3994
  else
3990
- element.gsub!(@@pattern_escape,TABLE_FOR_ESCAPE_)
3995
+ content.gsub!(@@pattern_escape,TABLE_FOR_ESCAPE_)
3991
3996
  end
3992
3997
 
3993
- element
3998
+ content
3994
3999
  end
3995
4000
  private :escape
3996
4001
 
3997
- def escape_content(element,elm_name)
4002
+ def escape_content(content,elm_name)
3998
4003
 
3999
4004
  if RUBY_VERSION < RUBY_VERSION_1_9_0 then
4000
- element = escape(element)
4005
+ content = escape(content)
4001
4006
 
4002
4007
  if !is_match(MATCH_TAG_2,elm_name) then
4003
4008
  #「¥r?¥n」->「<br>」
4004
- element.gsub!(@@pattern_br_1, BR_2)
4009
+ content.gsub!(@@pattern_br_1, BR_2)
4005
4010
  end
4006
4011
  else
4007
- element.gsub!(@@pattern_escape_content, TABLE_FOR_ESCAPE_CONTENT_)
4012
+ content.gsub!(@@pattern_escape_content, TABLE_FOR_ESCAPE_CONTENT_)
4008
4013
  end
4009
- element
4014
+ content
4010
4015
  end
4011
4016
  private :escape_content
4012
4017
 
4013
- def unescape(element)
4018
+ def unescape(content)
4014
4019
  #特殊文字の置換
4015
4020
  #「<」<-「&lt;」
4016
- #if element.include?(LT_2) then
4017
- # element.gsub!(@@pattern_lt_2,LT_1)
4021
+ #if content.include?(LT_2) then
4022
+ # content.gsub!(@@pattern_lt_2,LT_1)
4018
4023
  #end
4019
4024
  #「>」<-「&gt;」
4020
- #if element.include?(GT_2) then
4021
- # element.gsub!(@@pattern_gt_2,GT_1)
4025
+ #if content.include?(GT_2) then
4026
+ # content.gsub!(@@pattern_gt_2,GT_1)
4022
4027
  #end
4023
4028
  #「"」<-「&quotl」
4024
- #if element.include?(QO_2) then
4025
- # element.gsub!(@@pattern_dq_2,DOUBLE_QUATATION)
4029
+ #if content.include?(QO_2) then
4030
+ # content.gsub!(@@pattern_dq_2,DOUBLE_QUATATION)
4026
4031
  #end
4027
4032
  #「 」<-「&nbsp;」
4028
- #if element.include?(NBSP_2) then
4029
- # element.gsub!(@@pattern_space_2,SPACE)
4033
+ #if content.include?(NBSP_2) then
4034
+ # content.gsub!(@@pattern_space_2,SPACE)
4030
4035
  #end
4031
4036
  #「&」<-「&amp;」
4032
- #if element.include?(AND_2) then
4033
- # element.gsub!(@@pattern_and_2,AND_1)
4037
+ #if content.include?(AND_2) then
4038
+ # content.gsub!(@@pattern_and_2,AND_1)
4034
4039
  #end
4035
- element.gsub!(@@pattern_unescape) do
4040
+ content.gsub!(@@pattern_unescape) do
4036
4041
  case $1
4037
4042
  when AND_3 then
4038
4043
  AND_1
@@ -4049,21 +4054,21 @@ module Meteor
4049
4054
  end
4050
4055
  end
4051
4056
 
4052
- element
4057
+ content
4053
4058
  end
4054
4059
  private :unescape
4055
4060
 
4056
- def unescape_content(element,elm_name)
4057
- element = unescape(element)
4061
+ def unescape_content(content,elm_name)
4062
+ content = unescape(content)
4058
4063
 
4059
4064
  if !is_match(MATCH_TAG_2,elm_name) then
4060
4065
  #「<br>」->「¥r?¥n」
4061
- if element.include?(BR_2) then
4062
- element.gsub!(@@pattern_br_2, @root.kaigyo_code)
4066
+ if content.include?(BR_2) then
4067
+ content.gsub!(@@pattern_br_2, @root.kaigyo_code)
4063
4068
  end
4064
4069
  end
4065
4070
 
4066
- element
4071
+ content
4067
4072
  end
4068
4073
  private :unescape_content
4069
4074
 
@@ -4190,67 +4195,67 @@ module Meteor
4190
4195
  end
4191
4196
  private :set_mono_info
4192
4197
 
4193
- def escape(element)
4198
+ def escape(content)
4194
4199
  #特殊文字の置換
4195
4200
  if RUBY_VERSION < RUBY_VERSION_1_9_0 then
4196
4201
  #「&」->「&amp;」
4197
- if element.include?(AND_1) then
4198
- element.gsub!(@@pattern_and_1,AND_2)
4202
+ if content.include?(AND_1) then
4203
+ content.gsub!(@@pattern_and_1,AND_2)
4199
4204
  end
4200
4205
  #「<」->「&lt;」
4201
- if element.include?(LT_1) then
4202
- element.gsub!(@@pattern_lt_1,LT_2)
4206
+ if content.include?(LT_1) then
4207
+ content.gsub!(@@pattern_lt_1,LT_2)
4203
4208
  end
4204
4209
  #「>」->「&gt;」
4205
- if element.include?(GT_1) then
4206
- element.gsub!(@@pattern_gt_1,GT_2)
4210
+ if content.include?(GT_1) then
4211
+ content.gsub!(@@pattern_gt_1,GT_2)
4207
4212
  end
4208
4213
  #「"」->「&quot;」
4209
- if element.include?(DOUBLE_QUATATION) then
4210
- element.gsub!(@@pattern_dq_1,QO_2)
4214
+ if content.include?(DOUBLE_QUATATION) then
4215
+ content.gsub!(@@pattern_dq_1,QO_2)
4211
4216
  end
4212
4217
  #「'」->「&apos;」
4213
- if element.include?(AP_1) then
4214
- element.gsub!(@@pattern_ap_1,AP_2)
4218
+ if content.include?(AP_1) then
4219
+ content.gsub!(@@pattern_ap_1,AP_2)
4215
4220
  end
4216
4221
  else
4217
- element.gsub!(@@pattern_escape,TABLE_FOR_ESCAPE_)
4222
+ content.gsub!(@@pattern_escape,TABLE_FOR_ESCAPE_)
4218
4223
  end
4219
4224
 
4220
- element
4225
+ content
4221
4226
  end
4222
4227
  private :escape
4223
4228
 
4224
- def escape_content(element,elm_name)
4225
- escape(element)
4229
+ def escape_content(content,elm_name)
4230
+ escape(content)
4226
4231
  end
4227
4232
  private :escape_content
4228
4233
 
4229
- def unescape(element)
4234
+ def unescape(content)
4230
4235
  #特殊文字の置換
4231
4236
  #if RUBY_VERSION < RUBY_VERSION_1_9_0 then
4232
4237
  # #「<」<-「&lt;」
4233
- # if element.include?(LT_2) then
4234
- # element.gsub!(@@pattern_lt_2,LT_1)
4238
+ # if content.include?(LT_2) then
4239
+ # content.gsub!(@@pattern_lt_2,LT_1)
4235
4240
  # end
4236
4241
  # #「>」<-「&gt;」
4237
- # if element.include?(GT_2) then
4238
- # element.gsub!(@@pattern_gt_2,GT_1)
4242
+ # if content.include?(GT_2) then
4243
+ # content.gsub!(@@pattern_gt_2,GT_1)
4239
4244
  # end
4240
4245
  # #「"」<-「&quot;」
4241
- # if element.include?(QO_2) then
4242
- # element.gsub!(@@pattern_dq_2,DOUBLE_QUATATION)
4246
+ # if content.include?(QO_2) then
4247
+ # content.gsub!(@@pattern_dq_2,DOUBLE_QUATATION)
4243
4248
  # end
4244
4249
  # #「'」<-「&apos;」
4245
- # if element.include?(AP_2) then
4246
- # element.gsub!(@@pattern_ap_2,AP_1)
4250
+ # if content.include?(AP_2) then
4251
+ # content.gsub!(@@pattern_ap_2,AP_1)
4247
4252
  # end
4248
4253
  # #「&」<-「&amp;」
4249
- # if element.include?(AND_2) then
4250
- # element.gsub!(@@pattern_and_2,AND_1)
4254
+ # if content.include?(AND_2) then
4255
+ # content.gsub!(@@pattern_and_2,AND_1)
4251
4256
  # end
4252
4257
  #else
4253
- element.gsub!(@@pattern_unescape) do
4258
+ content.gsub!(@@pattern_unescape) do
4254
4259
  case $1
4255
4260
  when AND_3 then
4256
4261
  AND_1
@@ -4266,12 +4271,12 @@ module Meteor
4266
4271
  end
4267
4272
  #end
4268
4273
 
4269
- element
4274
+ content
4270
4275
  end
4271
4276
  private :unescape
4272
4277
 
4273
- def unescape_content(element,elm_name)
4274
- unescape(element)
4278
+ def unescape_content(content,elm_name)
4279
+ unescape(content)
4275
4280
  end
4276
4281
  private :unescape_content
4277
4282
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asip-meteor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1.9
4
+ version: 0.9.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - asip
@@ -9,7 +9,7 @@ autorequire: meteor
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-30 00:00:00 -07:00
12
+ date: 2009-05-31 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15