lederhosen 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lederhosen.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "lederhosen"
8
- s.version = "2.0.2"
8
+ s.version = "2.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Austin G. Davis-Richardson"]
@@ -21,6 +21,7 @@ module Lederhosen
21
21
  taxonomy_count =
22
22
  if not strict
23
23
  get_taxonomy_count(uc)
24
+
24
25
  elsif strict
25
26
  get_strict_taxonomy_count(uc, strict)
26
27
  end
@@ -77,7 +78,7 @@ module Lederhosen
77
78
  end # results.each_slice
78
79
  taxonomy_count
79
80
  end
80
-
81
+
81
82
  end
82
83
  end
83
84
  end
@@ -1,24 +1,36 @@
1
- require 'ostruct'
2
-
3
1
  module Lederhosen
4
2
 
5
3
  # represents a usearch result
6
4
  class UResult
7
5
 
8
- def initialize(hash)
9
- @source = OpenStruct.new(hash)
10
- end
6
+ attr_accessor :hit_type,
7
+ :cluster_no,
8
+ :alignment,
9
+ :query,
10
+ :target,
11
+ :length,
12
+ :identity,
13
+ :strand,
14
+ :cluster_size
11
15
 
12
- def method_missing(method, *args, &block)
13
- @source.send(method, *args, &block)
16
+ def initialize(hash)
17
+ self.hit_type = hash[:hit_type]
18
+ self.cluster_no = hash[:cluster_no]
19
+ self.alignment = hash[:alignment]
20
+ self.target = hash[:target]
21
+ self.query = hash[:query]
22
+ self.length = hash[:length]
23
+ self.identity = hash[:identity]
24
+ self.strand = hash[:strand]
25
+ self.cluster_size = hash[:cluster_size]
14
26
  end
15
27
 
16
28
  def hit?
17
- @source.hit_type == 'H'
29
+ self.hit_type == 'H'
18
30
  end
19
31
 
20
32
  def miss?
21
- @source.hit_type == 'N'
33
+ self.hit_type == 'N'
22
34
  end
23
35
  end
24
36
 
@@ -40,7 +52,7 @@ module Lederhosen
40
52
  end
41
53
 
42
54
  private
43
-
55
+
44
56
  # parse a line of usearch prefix
45
57
  # return a hash in the form:
46
58
  # { :taxonomy => '', :identity => '0.00', ... }
@@ -85,4 +97,4 @@ module Lederhosen
85
97
  dat.merge(r)
86
98
  end
87
99
  end
88
- end
100
+ end
@@ -3,7 +3,7 @@ module Lederhosen
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
5
  CODENAME = 'Schnittlauchbrot' # changes for minor versions
6
- PATCH = 2
6
+ PATCH = 3
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lederhosen
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  segments:
150
150
  - 0
151
- hash: 525006201673816034
151
+ hash: 3754039261049912436
152
152
  required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements: