meteor 0.9.8.1 → 0.9.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/meteor.rb +98 -98
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e08d7846e20f1e7fcb1aa755175cafcbb3a451f6
4
- data.tar.gz: 2130feb4f92b95ef53cfd2e9cbb03f7aee73a408
3
+ metadata.gz: 1f8837893d35b341d3342a0007e182ed02e7a659
4
+ data.tar.gz: 0cb187ef585ed1e86748a253f1e2d16f7397fb78
5
5
  SHA512:
6
- metadata.gz: bf2618e5090b829294e39707bd9c237ed0bf913f41c9d46e330b7c42c0b0e8fac5a4040b04051672486a7796b7e230b58824bd56f7e478c4683c2e5475783e3c
7
- data.tar.gz: 60d6f332459a50e624e21f70425b1e1f108366c091a1212ba9398a51bfeff5f337c99c1a79e83b4ff191c6cdf1b0b60471643e666619e5c3c11baf62b743622a
6
+ metadata.gz: 5e0549027633b0321f65e516ad318fd5943c6d5d7d1c60196d0054de6281fb008c22e615d1f6b39ec606493c617e6a06bdfcb68d3c2eccacc37ea878a45a7df7
7
+ data.tar.gz: 060616e4e08d83c549a3a3188205d38a95704d35426d750127163d08b18acea02845b2c79905d19d1f3b1ac5bd21f8bb02b0d9ac1597af19fb57a756d603a9d9
@@ -18,12 +18,12 @@
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.8.1
21
+ # @version 0.9.8.2
22
22
  #
23
23
 
24
24
  module Meteor
25
25
 
26
- VERSION = '0.9.8.1'.freeze
26
+ VERSION = '0.9.8.2'.freeze
27
27
 
28
28
  #require 'fileutils'
29
29
 
@@ -100,7 +100,7 @@ module Meteor
100
100
  #
101
101
  # initializer (イニシャライザ)
102
102
  # @overload initialize(tag)
103
- # @param [String] tag tag name (タグ名)
103
+ # @param [String,Symbol] tag tag name (タグ名)
104
104
  # @overload initialize(elm)
105
105
  # @param [Meteor::Element] elm element (要素)
106
106
  # @overload initialize(elm,ps)
@@ -280,41 +280,41 @@ module Meteor
280
280
  # @return [Meteor::Element] element (要素)
281
281
  # @overload element(tag)
282
282
  # get element using tag name (要素のタグ名で要素を取得する)
283
- # @param [String] tag tag name (タグ名)
283
+ # @param [String,Symbol] tag tag name (タグ名)
284
284
  # @return [Meteor::Element] element (要素)
285
285
  # @overload element(tag,attrs)
286
286
  # get element using tag name and attribute map (要素のタグ名と属性(属性名="属性値")あるいは属性1・属性2(属性名="属性値")で要素を取得する)
287
- # @param [String] tag tag name (タグ名)
288
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
287
+ # @param [String,Symbol] tag tag name (タグ名)
288
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
289
289
  # @return [Meteor::Element] element (要素)
290
290
  # @overload element(attrs)
291
291
  # get element using attribute map (属性(属性名="属性値")あるいは属性1・属性2(属性名="属性値")で要素を取得する)
292
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
292
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
293
293
  # @return [Meteor::Element] element(要素)
294
294
  # @overload element(tag,attr_name,attr_value)
295
295
  # get element using tag name and attribute(name="value") (要素のタグ名と属性(属性名="属性値")で要素を取得する)
296
- # @param [String] tag tag name (タグ名)
297
- # @param [String] attr_name attribute name (属性名)
296
+ # @param [String,symbol] tag tag name (タグ名)
297
+ # @param [String,symbol] attr_name attribute name (属性名)
298
298
  # @param [String] attr_value attribute value (属性値)
299
299
  # @return [Meteor::Element] element (要素)
300
300
  # @overload element(attr_name,attr_value)
301
301
  # get element using attribute(name="value") (属性(属性名="属性値")で要素を取得する)
302
- # @param [String] attr_name 属性名
302
+ # @param [String,Symbol] attr_name 属性名
303
303
  # @param [String] attr_value 属性値
304
304
  # @return [Meteor::Element] element (要素)
305
305
  # @overload element(tag,attr_name1,attr_value1,attr_name2,attr_value2)
306
306
  # get element using tag name and attribute1,2(name="value") (要素のタグ名と属性1・属性2(属性名="属性値")で要素を取得する)
307
- # @param [String] tag tag name (タグ名)
308
- # @param [String] attr_name1 attribute name1 (属性名1)
307
+ # @param [String,Symbol] tag tag name (タグ名)
308
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
309
309
  # @param [String] attr_value1 attribute value1 (属性値1)
310
- # @param [String] attr_name2 attribute name2 (属性名2)
310
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
311
311
  # @param [String] attr_value2 attribute value2 (属性値2)
312
312
  # @return [Meteor::Element] element (要素)
313
313
  # @overload element(attr_name1,attr_value1,attr_name2,attr_value2)
314
314
  # get element using attribute1,2(name="value") (属性1・属性2(属性名="属性値")で要素を取得する)
315
- # @param [String] attr_name1 属性名1
315
+ # @param [String,Symbol] attr_name1 属性名1
316
316
  # @param [String] attr_value1 属性値1
317
- # @param [String] attr_name2 属性名2
317
+ # @param [String,Symbol] attr_name2 属性名2
318
318
  # @param [String] attr_value2 属性値2
319
319
  # @return [Meteor::Element] element(要素)
320
320
  # @overload element(elm)
@@ -338,41 +338,41 @@ module Meteor
338
338
  # get elements (要素を取得する)
339
339
  # @overload elements(tag)
340
340
  # get elements using tag name (要素のタグ名で要素を取得する)
341
- # @param [String] tag tag name (タグ名)
341
+ # @param [String,Symbol] tag tag name (タグ名)
342
342
  # @return [Array<Meteor::Element>] element array(要素配列)
343
343
  # @overload elements(tag,attrs)
344
344
  # get elements using tag name and attribute map (要素のタグ名と属性(属性名="属性値")あるいは属性1・属性2(属性名="属性値")で要素を取得する)
345
- # @param [String] tag tag name (タグ名)
346
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
345
+ # @param [String,Symbol] tag tag name (タグ名)
346
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
347
347
  # @return [Array<Meteor::Element>] element array (要素配列)
348
348
  # @overload elements(attrs)
349
349
  # get elements using attribute map (属性(属性名="属性値")あるいは属性1・属性2(属性名="属性値")で要素を取得する)
350
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
350
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
351
351
  # @return [Array<Meteor::Element>] element array (要素配列)
352
352
  # @overload elements(tag,attr_name,attr_value)
353
353
  # get elements using tag name and attribute(name="value") (要素のタグ名と属性(属性名="属性値")で要素を取得する)
354
- # @param [String] tag tag name (タグ名)
355
- # @param [String] attr_name attribute name (属性名)
354
+ # @param [String,Symbol] tag tag name (タグ名)
355
+ # @param [String,symbol] attr_name attribute name (属性名)
356
356
  # @param [String] attr_value attribute value (属性値)
357
357
  # @return [Array<Meteor::Element>] element array (要素配列)
358
358
  # @overload elements(attr_name,attr_value)
359
359
  # get elements using attribute(name="value") (属性(属性名="属性値")で要素を取得する)
360
- # @param [String] attr_name attribute name (属性名)
360
+ # @param [String,Symbol] attr_name attribute name (属性名)
361
361
  # @param [String] attr_value attribute value (属性値)
362
362
  # @return [Array<Meteor::Element>] element array (要素配列)
363
363
  # @overload elements(tag,attr_name1,attr_value1,attr_name2,attr_value2)
364
364
  # get elements using tag name and attribute1,2(name="value") (要素のタグ名と属性1・属性2(属性名="属性値")で要素を取得する)
365
- # @param [String] tag tag name (タグ名)
366
- # @param [String] attr_name1 attribute name1 (属性名1)
365
+ # @param [String,Symbol] tag tag name (タグ名)
366
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
367
367
  # @param [String] attr_value1 attribute value1 (属性値1)
368
- # @param [String] attr_name2 attribute name2 (属性名2)
368
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
369
369
  # @param [String] attr_value2 attribute value2 (属性値2)
370
370
  # @return [Array<Meteor::Element>] element array (要素配列)
371
371
  # @overload elements(attr_name1,attr_value1,attr_name2,attr_value2)
372
372
  # get elements using attribute1,2(name="value") (属性1・属性2(属性名="属性値")で要素を取得する)
373
- # @param [String] attr_name1 attribute name1 (属性名1)
373
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
374
374
  # @param [String] attr_value1 attribute value1 (属性値1)
375
- # @param [String] attr_name2 attribute name2 (属性名2)
375
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
376
376
  # @param [String] attr_value2 attribute value2 (属性値2)
377
377
  # @return [Array<Meteor::Element>] element array (要素配列)
378
378
  #
@@ -396,7 +396,7 @@ module Meteor
396
396
  # get cx(comment extension) tag (CX(コメント拡張)タグを取得する)
397
397
  # @overload cxtag(tag,id)
398
398
  # get cx(comment extension) tag using tag name and id attribute (タグ名とID属性(id="ID属性値")でCX(コメント拡張)タグを取得する)
399
- # @param [String] tag tag name (タグ名)
399
+ # @param [String,Symbol] tag tag name (タグ名)
400
400
  # @param [String] id id attribute value (ID属性値)
401
401
  # @return [Meteor::Element] element(要素)
402
402
  # @overload cxtag(id)
@@ -411,17 +411,17 @@ module Meteor
411
411
  #
412
412
  # @overload attr(attr)
413
413
  # set attribute of element (要素の属性をセットする)
414
- # @param [Hash<String,String>] attr attribute (属性)
414
+ # @param [Hash<String,String>,Hash<Symbol,String>] attr attribute (属性)
415
415
  # @return [Meteor::Element] element (要素)
416
416
  # @deprecated
417
417
  # @overload attr(attr_name,attr_value)
418
418
  # set attribute of element (要素の属性をセットする)
419
- # @param [String] attr_name attribute name (属性名)
419
+ # @param [String,Symbol] attr_name attribute name (属性名)
420
420
  # @param [String,true,false] attr_value attribute value (属性値)
421
421
  # @return [Meteor::Element] element (要素)
422
422
  # @overload attr(attr_name)
423
423
  # get attribute value of element (要素の属性値を取得する)
424
- # @param [String] attr_name attribute name (属性名)
424
+ # @param [String,Symbol] attr_name attribute name (属性名)
425
425
  # @return [String] attribute value (属性値)
426
426
  #
427
427
  def attr(attrs,*args)
@@ -430,7 +430,7 @@ module Meteor
430
430
 
431
431
  #
432
432
  # set attribute of element (要素の属性をセットする)
433
- # @param [Hash] attr attribute (属性)
433
+ # @param [Hash<String,String>,Hash<Symbol,String>] attr attribute (属性)
434
434
  # @return [Meteor::Element] element (要素)
435
435
  #
436
436
  def attr=(attr)
@@ -439,7 +439,7 @@ module Meteor
439
439
 
440
440
  #
441
441
  # set attribute map (要素マップをセットする)
442
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
442
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
443
443
  # @return [Meteor::Element] element (要素)
444
444
  def attrs=(attrs)
445
445
  @parser.attrs(self,attrs)
@@ -447,7 +447,7 @@ module Meteor
447
447
 
448
448
  #
449
449
  # get attribute map (属性マップを取得する)
450
- # @return [Hash<String,String>] attribute map (属性マップ)
450
+ # @return [Hash<String,String>,Hash<Symbol,String>] attribute map (属性マップ)
451
451
  #
452
452
  def attrs
453
453
  @parser.attrs(self)
@@ -507,7 +507,7 @@ module Meteor
507
507
 
508
508
  #
509
509
  # set attribute (属性をセットする)
510
- # @param [String] name attribute name (属性の名前)
510
+ # @param [String,Symbol] name attribute name (属性の名前)
511
511
  # @param [String] value attribute value (属性の値)
512
512
  # @return [Meteor::Element] element (要素)
513
513
  #
@@ -517,7 +517,7 @@ module Meteor
517
517
 
518
518
  #
519
519
  # get attribute value (属性の値を取得する)
520
- # @param [String] name attribute name (属性の名前)
520
+ # @param [String,Symbol] name attribute name (属性の名前)
521
521
  # @return [String] attribute value (属性の値)
522
522
  #
523
523
  def [](name)
@@ -526,7 +526,7 @@ module Meteor
526
526
 
527
527
  #
528
528
  # remove attribute of element (要素の属性を消す)
529
- # @param [String] attr_name attribute name (属性名)
529
+ # @param [String,Symbol] attr_name attribute name (属性名)
530
530
  # @return [Meteor::Element] element (要素)
531
531
  #
532
532
  def remove_attr(attr_name)
@@ -632,7 +632,7 @@ module Meteor
632
632
 
633
633
  #
634
634
  # set a couple of attribute name and attribute value (属性名と属性値を対としてセットする)
635
- # @param [String] name attribute name (属性名)
635
+ # @param [String,Symbol] name attribute name (属性名)
636
636
  # @param [String] value attribute value (属性値)
637
637
  #
638
638
  def store(name, value)
@@ -666,7 +666,7 @@ module Meteor
666
666
 
667
667
  #
668
668
  # get attribute value using attribute name (属性名で属性値を取得する)
669
- # @param [String] name attribute name (属性名)
669
+ # @param [String,Symbol] name attribute name (属性名)
670
670
  # @return [String] attribute value (属性値)
671
671
  #
672
672
  def fetch(name)
@@ -712,7 +712,7 @@ module Meteor
712
712
  #
713
713
  # set a couple of attribute name and attribute value (属性名と属性値を対としてセットする)
714
714
  #
715
- # @param [String] name attribute name (属性名)
715
+ # @param [String,Symbol] name attribute name (属性名)
716
716
  # @param [String] value attribute value (属性値)
717
717
  #
718
718
  def []=(name, value)
@@ -722,7 +722,7 @@ module Meteor
722
722
  #
723
723
  # get attribute value using attribute name (属性名で属性値を取得する)
724
724
  #
725
- # @param [String] name attribute name (属性名)
725
+ # @param [String,Symbol] name attribute name (属性名)
726
726
  # @return [String] attribute value (属性値)
727
727
  #
728
728
  def [](name)
@@ -734,7 +734,7 @@ module Meteor
734
734
  # Attribute class (属性クラス)
735
735
  #
736
736
  # @!attribute [rw] name
737
- # @return [String] attribute name (名前)
737
+ # @return [String,symbol] attribute name (名前)
738
738
  # @!attribute [rw] value
739
739
  # @return [String] attribute value (値)
740
740
  # @!attribute [rw] changed
@@ -1112,7 +1112,7 @@ module Meteor
1112
1112
  #
1113
1113
  #@overload parser(key)
1114
1114
  # get parser (パーサを取得する)
1115
- # @param [String] key identifier (キー)
1115
+ # @param [String,Symbol] key identifier (キー)
1116
1116
  # @return [Meteor::Parser] parser (パーサ)
1117
1117
  #@overload parser(type,relative_path,enc)
1118
1118
  # generate parser (パーサを作成する)
@@ -1143,7 +1143,7 @@ module Meteor
1143
1143
  # @return [Meteor::Parser] parser (パーサ)
1144
1144
  #
1145
1145
  def parser_1(key)
1146
- @pif = @cache[key]
1146
+ @pif = @cache[key.to_s]
1147
1147
  case @pif.doc_type
1148
1148
  when Meteor::Parser::HTML
1149
1149
  Meteor::Ml::Html::ParserImpl.new(@pif)
@@ -1162,7 +1162,7 @@ module Meteor
1162
1162
 
1163
1163
  #
1164
1164
  # get root element (ルート要素を取得する)
1165
- # @param [String] key identifier (キー)
1165
+ # @param [String,Symbol] key identifier (キー)
1166
1166
  # @return [Meteor::RootElement] root element (ルート要素)
1167
1167
  #
1168
1168
  def element(key)
@@ -1253,7 +1253,7 @@ module Meteor
1253
1253
 
1254
1254
  #
1255
1255
  # set parser (パーサをセットする)
1256
- # @param [String] key identifier (キー)
1256
+ # @param [String,Symbol] key identifier (キー)
1257
1257
  # @param [Meteor::Parser] ps parser (パーサ)
1258
1258
  #
1259
1259
  def []=(key, ps)
@@ -1262,7 +1262,7 @@ module Meteor
1262
1262
 
1263
1263
  #
1264
1264
  # get parser (パーサを取得する)
1265
- # @param [String] key identifier (キー)
1265
+ # @param [String,Symbol] key identifier (キー)
1266
1266
  # @return [Meteor::Parser] parser (パーサ)
1267
1267
  #
1268
1268
  def [](key)
@@ -1325,7 +1325,7 @@ module Meteor
1325
1325
 
1326
1326
  #
1327
1327
  # get root element (ルート要素を取得する)
1328
- # @param [String] key identifier (キー)
1328
+ # @param [String,Symbol] key identifier (キー)
1329
1329
  # @return [Meteor::RootElement] root element (ルート要素)
1330
1330
  #
1331
1331
  def self.element(key)
@@ -1349,24 +1349,24 @@ module Meteor
1349
1349
  #
1350
1350
  # initializer (イニシャライザ)
1351
1351
  # @overload initialize(tag)
1352
- # @param [String] tag tag name (タグ名)
1352
+ # @param [String,Symbol] tag tag name (タグ名)
1353
1353
  # @overload initialize(attr_name,attr_value)
1354
- # @param [String] attr_name attribute name (属性名)
1354
+ # @param [String,Symbol] attr_name attribute name (属性名)
1355
1355
  # @param [String] attr_value attribute value (属性値)
1356
1356
  # @overload initialize(tag,attr_name,attr_value)
1357
- # @param [String] tag tag name (タグ名)
1358
- # @param [String] attr_name attribute name (属性名)
1357
+ # @param [String,Symbol] tag tag name (タグ名)
1358
+ # @param [String,Symbol] attr_name attribute name (属性名)
1359
1359
  # @param [String] attr_value attribute value (属性値)
1360
1360
  # @overload initialize(attr_name1,attr_value1,attr_name2,attr_value2)
1361
- # @param [String] attr_name1 attribute name1 (属性名1)
1361
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
1362
1362
  # @param [String] attr_value1 attribute value1 (属性値1)
1363
- # @param [String] attr_name2 attribute name2 (属性名2)
1363
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
1364
1364
  # @param [String] attr_value2 attribute value2 (属性値2)
1365
1365
  # @overload initialize(tag,attr_name1,attr_value1,attr_name2,attr_value2)
1366
- # @param [String] tag tag name (タグ名)
1367
- # @param [String] attr_name1 attribute name1 (属性名1)
1366
+ # @param [String,Symbol] tag tag name (タグ名)
1367
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
1368
1368
  # @param [String] attr_value1 attribute value1 (属性値1)
1369
- # @param [String] attr_name2 attribute name2 (属性名2)
1369
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
1370
1370
  # @param [String] attr_value2 attribute value2 (属性値2)
1371
1371
  #
1372
1372
  def initialize(*args)
@@ -1779,41 +1779,41 @@ module Meteor
1779
1779
  # get element (要素を取得する)
1780
1780
  # @overload element(tag)
1781
1781
  # get element using tag name (要素のタグ名で要素を取得する)
1782
- # @param [String] tag tag name (タグ名)
1782
+ # @param [String,Symbol] tag tag name (タグ名)
1783
1783
  # @return [Meteor::Element] element(要素)
1784
1784
  # @overload element(tag,attrs)
1785
1785
  # get element using tag name and attribute map (要素のタグ名と属性(属性名="属性値")あるいは属性1・属性2(属性名="属性値")で要素を取得する)
1786
- # @param [String] tag tag name (タグ名)
1787
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
1786
+ # @param [String,Symbol] tag tag name (タグ名)
1787
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
1788
1788
  # @return [Meteor::Element] element (要素)
1789
1789
  # @overload element(attrs)
1790
1790
  # get element using attribute map (属性(属性名="属性値")あるいは属性1・属性2(属性名="属性値")で要素を取得する)
1791
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
1791
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
1792
1792
  # @return [Meteor::Element] element (要素)
1793
1793
  # @overload element(tag,attr_name,attr_value)
1794
1794
  # get element using tag name and attribute(name="value") (要素のタグ名と属性(属性名="属性値")で要素を取得する)
1795
- # @param [String] tag tag name (タグ名)
1796
- # @param [String] attr_name attribute name (属性名)
1795
+ # @param [String,Symbol] tag tag name (タグ名)
1796
+ # @param [String,Symbol] attr_name attribute name (属性名)
1797
1797
  # @param [String] attr_value attribute value (属性値)
1798
1798
  # @return [Meteor::Element] element (要素)
1799
1799
  # @overload element(attr_name,attr_value)
1800
1800
  # get element using attribute(name="value") (属性(属性名="属性値")で要素を取得する)
1801
- # @param [String] attr_name attribute name (属性名)
1801
+ # @param [String,Symbol] attr_name attribute name (属性名)
1802
1802
  # @param [String] attr_value attribute value (属性値)
1803
1803
  # @return [Meteor::Element] element (要素)
1804
1804
  # @overload element(tag,attr_name1,attr_value1,attr_name2,attr_value2)
1805
1805
  # get element using tag name and attribute1,2(name="value") (要素のタグ名と属性1・属性2(属性名="属性値")で要素を取得する)
1806
- # @param [String] tag tag name (タグ名)
1807
- # @param [String] attr_name1 attribute name1 (属性名1)
1806
+ # @param [String,Symbol] tag tag name (タグ名)
1807
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
1808
1808
  # @param [String] attr_value1 attribute value1 (属性値1)
1809
- # @param [String] attr_name2 attribute name2 (属性名2)
1809
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
1810
1810
  # @param [String] attr_value2 attribute value2 (属性値2)
1811
1811
  # @return [Meteor::Element] element (要素)
1812
1812
  # @overload element(attr_name1,attr_value1,attr_name2,attr_value2)
1813
1813
  # get element using attribute1,2(name="value") (属性1・属性2(属性名="属性値")で要素を取得する)
1814
- # @param [String] attr_name1 attribute name1 (属性名1)
1814
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
1815
1815
  # @param [String] attr_value1 attribute value1 (属性値1)
1816
- # @param [String] attr_name2 attribute name2 (属性名2)
1816
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
1817
1817
  # @param [String] attr_value2 attribute value2 (属性値2)
1818
1818
  # @return [Meteor::Element] element (要素)
1819
1819
  # @overload element(elm)
@@ -1823,8 +1823,8 @@ module Meteor
1823
1823
  #
1824
1824
  def element(elm, attrs = nil,*args)
1825
1825
  if !attrs
1826
- if elm.kind_of?(String)
1827
- element_1(elm)
1826
+ if elm.kind_of?(String) || elm.kind_of?(Symbol)
1827
+ element_1(elm.to_s)
1828
1828
  if @elm_
1829
1829
  @element_cache.store(@elm_.object_id, @elm_)
1830
1830
  end
@@ -1832,12 +1832,12 @@ module Meteor
1832
1832
  shadow(elm)
1833
1833
  elsif elm.kind_of?(Hash)
1834
1834
  if elm.size == ONE
1835
- element_2(elm.keys[0], elm.values[0])
1835
+ element_2(elm.keys[0].to_s, elm.values[0])
1836
1836
  if @elm_
1837
1837
  @element_cache.store(@elm_.object_id, @elm_)
1838
1838
  end
1839
1839
  elsif elm.size == TWO
1840
- element_4(elm.keys[0], elm.values[0], elm.keys[1], elm.values[1])
1840
+ element_4(elm.keys[0].to_s, elm.values[0], elm.keys[1].to_s, elm.values[1])
1841
1841
  if @elm_
1842
1842
  @element_cache.store(@elm_.object_id, @elm_)
1843
1843
  end
@@ -1849,12 +1849,12 @@ module Meteor
1849
1849
  end
1850
1850
  elsif attrs.kind_of?(Hash)
1851
1851
  if attrs.size == ONE
1852
- element_3(elm, attrs.keys[0], attrs.values[0])
1852
+ element_3(elm.to_s, attrs.keys[0].to_s, attrs.values[0])
1853
1853
  if @elm_
1854
1854
  @element_cache.store(@elm_.object_id, @elm_)
1855
1855
  end
1856
1856
  elsif attrs.size == TWO
1857
- element_5(elm, attrs.keys[0], attrs.values[0], attrs.keys[1], attrs.values[1])
1857
+ element_5(elm.to_s, attrs.keys[0].to_s, attrs.values[0], attrs.keys[1].to_s, attrs.values[1])
1858
1858
  if @elm_
1859
1859
  @element_cache.store(@elm_.object_id, @elm_)
1860
1860
  end
@@ -1862,25 +1862,25 @@ module Meteor
1862
1862
  @elm_ = nil
1863
1863
  raise ArgumentError
1864
1864
  end
1865
- elsif attrs.kind_of?(String)
1865
+ elsif attrs.kind_of?(String) || attrs.kind_of?(Symbol)
1866
1866
  case args.length
1867
1867
  when ZERO
1868
- element_2(elm,attrs)
1868
+ element_2(elm.to_s,attrs.to_s)
1869
1869
  if @elm_
1870
1870
  @element_cache.store(@elm_.object_id, @elm_)
1871
1871
  end
1872
1872
  when ONE
1873
- element_3(elm, attrs, args[0])
1873
+ element_3(elm.to_s, attrs.to_s, args[0])
1874
1874
  if @elm_
1875
1875
  @element_cache.store(@elm_.object_id, @elm_)
1876
1876
  end
1877
1877
  when TWO
1878
- element_4(elm, attrs, args[0],args[1])
1878
+ element_4(elm.to_s, attrs.to_s, args[0].to_s,args[1])
1879
1879
  if @elm_
1880
1880
  @element_cache.store(@elm_.object_id, @elm_)
1881
1881
  end
1882
1882
  when THREE
1883
- element_5(elm, attrs, args[0],args[1],args[2])
1883
+ element_5(elm.to_s, attrs.to_s, args[0],args[1].to_s,args[2])
1884
1884
  if @elm_
1885
1885
  @element_cache.store(@elm_.object_id, @elm_)
1886
1886
  end
@@ -1896,7 +1896,7 @@ module Meteor
1896
1896
 
1897
1897
  #
1898
1898
  # get element using tag name (タグ名で検索し、要素を取得する)
1899
- # @param [String] tag tag name (タグ名)
1899
+ # @param [String,Symbol] tag tag name (タグ名)
1900
1900
  # @return [Meteor::Element] element(要素)
1901
1901
  #
1902
1902
  def element_1(tag)
@@ -2914,41 +2914,41 @@ module Meteor
2914
2914
  # get elements (要素を取得する)
2915
2915
  # @overload elements(tag)
2916
2916
  # get elements using tag name (要素のタグ名で要素を取得する)
2917
- # @param [String] tag tag name (タグ名)
2917
+ # @param [String,Symbol] tag tag name (タグ名)
2918
2918
  # @return [Array<Meteor::Element>] element array(要素配列)
2919
2919
  # @overload elements(tag,attrs)
2920
2920
  # get elements using tag name and attribute map (要素のタグ名と属性(属性名="属性値")あるいは属性1・属性2(属性名="属性値")で要素を取得する)
2921
- # @param [String] tag tag name (タグ名)
2922
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
2921
+ # @param [String,Symbol] tag tag name (タグ名)
2922
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
2923
2923
  # @return [Array<Meteor::Element>] element array (要素配列)
2924
2924
  # @overload elements(attrs)
2925
2925
  # get elements using attribute map (属性(属性名="属性値")あるいは属性1・属性2(属性名="属性値")で要素を取得する)
2926
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
2926
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
2927
2927
  # @return [Array<Meteor::Element>] element array (要素配列)
2928
2928
  # @overload elements(tag,attr_name,attr_value)
2929
2929
  # get elements using tag name and attribute(name="value") (要素のタグ名と属性(属性名="属性値")で要素を取得する)
2930
- # @param [String] tag tag name (タグ名)
2931
- # @param [String] attr_name attribute name (属性名)
2930
+ # @param [String,Symbol] tag tag name (タグ名)
2931
+ # @param [String,Symbol] attr_name attribute name (属性名)
2932
2932
  # @param [String] attr_value attribute value (属性値)
2933
2933
  # @return [Array<Meteor::Element>] element array (要素配列)
2934
2934
  # @overload elements(attr_name,attr_value)
2935
2935
  # get elements using attribute(name="value") (属性(属性名="属性値")で要素を取得する)
2936
- # @param [String] attr_name attribute name (属性名)
2936
+ # @param [String,Symbol] attr_name attribute name (属性名)
2937
2937
  # @param [String] attr_value attribute value (属性値)
2938
2938
  # @return [Array<Meteor::Element>] element array (要素配列)
2939
2939
  # @overload elements(tag,attr_name1,attr_value1,attr_name2,attr_value2)
2940
2940
  # get elements using tag name and attribute1,2(name="value") (要素のタグ名と属性1・属性2(属性名="属性値")で要素を取得する)
2941
- # @param [String] tag tag name (タグ名)
2942
- # @param [String] attr_name1 attribute name1 (属性名1)
2941
+ # @param [String,Symbol] tag tag name (タグ名)
2942
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
2943
2943
  # @param [String] attr_value1 attribute value1 (属性値1)
2944
- # @param [String] attr_name2 attribute name2 (属性名2)
2944
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
2945
2945
  # @param [String] attr_value2 attribute value2 (属性値2)
2946
2946
  # @return [Array<Meteor::Element>] element array (要素配列)
2947
2947
  # @overload elements(attr_name1,attr_value1,attr_name2,attr_value2)
2948
2948
  # get elements using attribute1,2(name="value") (属性1・属性2(属性名="属性値")で要素を取得する)
2949
- # @param [String] attr_name1 attribute name1 (属性名1)
2949
+ # @param [String,Symbol] attr_name1 attribute name1 (属性名1)
2950
2950
  # @param [String] attr_value1 attribute value1 (属性値1)
2951
- # @param [String] attr_name2 attribute name2 (属性名2)
2951
+ # @param [String,Symbol] attr_name2 attribute name2 (属性名2)
2952
2952
  # @param [String] attr_value2 attribute value2 (属性値2)
2953
2953
  # @return [Array<Meteor::Element>] element array (要素配列)
2954
2954
  #
@@ -3143,18 +3143,18 @@ module Meteor
3143
3143
  # @overload attr(elm,attr)
3144
3144
  # set attribute of element (要素の属性をセットする)
3145
3145
  # @param [Meteor::Element] elm element (要素)
3146
- # @param [Hash<String,String>] attr attribute (属性)
3146
+ # @param [Hash<String,String>,Hash<Symbol,String>] attr attribute (属性)
3147
3147
  # @return [Meteor::Element] element (要素)
3148
3148
  # @overload attr(elm,attr_name,attr_value)
3149
3149
  # set attribute of element (要素の属性をセットする)
3150
3150
  # @param [Meteor::Element] elm element (要素)
3151
- # @param [String] attr_name attribute name (属性名)
3151
+ # @param [String,Symbol] attr_name attribute name (属性名)
3152
3152
  # @param [String,true,false] attr_value attribute value (属性値)
3153
3153
  # @return [Meteor::Element] element (要素)
3154
3154
  # @overload attr(elm,attr_name)
3155
3155
  # get attribute value of element (要素の属性値を取得する)
3156
3156
  # @param [Meteor::Element] elm element (要素)
3157
- # @param [String] attr_name attribute name (属性名)
3157
+ # @param [String,Symbol] attr_name attribute name (属性名)
3158
3158
  # @return [String] attribute value (属性値)
3159
3159
  #
3160
3160
  def attr(elm, attr,*args)
@@ -3263,7 +3263,7 @@ module Meteor
3263
3263
  #
3264
3264
  # @overload attrs(elm,attrs)
3265
3265
  # @param [Meteor::element] elm element (要素)
3266
- # @param [Hash<String,String>] attrs attribute map (属性マップ)
3266
+ # @param [Hash<String,String>,Hash<Symbol,String>] attrs attribute map (属性マップ)
3267
3267
  # @overload attrs(elm)
3268
3268
  # @param [Meteor::element] elm element (要素)
3269
3269
  # @return [Hash<String,String>] attribute map (要素マップ)
@@ -3524,7 +3524,7 @@ module Meteor
3524
3524
  # get cx(comment extension) tag (CX(コメント拡張)タグを取得する)
3525
3525
  # @overload cxtag(tag,id)
3526
3526
  # get cx(comment extension) tag using tag name and id attribute (要素のタグ名とID属性(id="ID属性値")でCX(コメント拡張)タグを取得する)
3527
- # @param [String] tag tag name (タグ名)
3527
+ # @param [String,Symbol] tag tag name (タグ名)
3528
3528
  # @param [String] id id attribute value (ID属性値)
3529
3529
  # @return [Meteor::Element] element (要素)
3530
3530
  # @overload cxtag(id)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meteor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8.1
4
+ version: 0.9.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasumasa Ashida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-14 00:00:00.000000000 Z
11
+ date: 2014-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler