bbs_2ch_url_validator 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4715910d9dd5a43bc119afd5f11034ff4c38792e
4
- data.tar.gz: 9d6f0ca4e3bbe5b8b6e4fa4211386586fd28b123
3
+ metadata.gz: 5db179c5e56b3cc6205765c92d41432c4cd04c33
4
+ data.tar.gz: 38981b1491d25439186bbcdfc109d022abfa578b
5
5
  SHA512:
6
- metadata.gz: 840762e7d9ea40021c7dc6fdae61d73a5de830f8c063cf999e7aa5753dfe02fe205620f2415fe2a5162431e44fbc49d782ddf3b443a0431d63734d283b5ee15a
7
- data.tar.gz: e5e9244fa79278c6cba707ae25154702b71027f3b7a448f2e48fa51311974c58eb3bdb0c180a03a214a77012b2d00fbcb9765e947ab025db3a225e353d3ea1ad
6
+ metadata.gz: 631d2a863cce82bbbe8f47f25fae4c23c2375d876f0b6412fc0612dd13293d190e725313f7c99c75cb953add487821d2d0ba306a2c13ddd04dc1c69f270926ee
7
+ data.tar.gz: e2012bea3c9238a5154fb2c69cd21d252935381e89ca59d83cf0436d92afba4e66ae77a2b5c50620e6182d14455ee9e1c24b3bb587aa7934426c7666c3071958
data/README.md CHANGED
@@ -45,6 +45,7 @@ The gem is available as open source under the terms of the [MIT License](http://
45
45
 
46
46
  ## History
47
47
 
48
+ - v0.1.4 Fix bugs of these: #dat?, #subject?, #setting?, #open? and override UrlInfo#to_s
48
49
  - v0.1.3 Add Bbs2chUrlValidator::URL#subject, #dat, #setting, #dat?, #subject?, #setting?, #open?
49
50
  - v0.1.2 Put #build_url into instance variable 'built_url'
50
51
  - v0.1.1 Add UrlInfo#build_url
@@ -1,3 +1,3 @@
1
1
  module Bbs2chUrlValidator
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -73,11 +73,17 @@ module Bbs2chUrlValidator
73
73
  generate_special_url(:setting)
74
74
  end
75
75
 
76
+ def to_s
77
+ built_url
78
+ end
79
+
76
80
  private
77
81
 
78
82
  def define_methods
79
83
  %w(is_open is_dat is_subject is_setting).each do |attr|
80
- self.class.send(:define_method, attr.gsub(/is_(.+)/) { "#{$1}?" }) { attr }
84
+ method_name = attr.gsub(/is_(.+)/) { "#{$1}?" }
85
+ self.class.send(:define_method,
86
+ method_name) { instance_variable_get("@#{attr}") }
81
87
  end
82
88
  end
83
89
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbs_2ch_url_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - dogwood008
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-04 00:00:00.000000000 Z
11
+ date: 2016-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler