grizzly_ber 0.0.2 → 0.0.3

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/grizzly_ber.rb +6 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b796ad9d2b49d6498abc07485fbb2f66246e1e27
4
- data.tar.gz: 59fcdec2acadfef81f5d4b84985c111837cd8fd0
3
+ metadata.gz: 65560c58030a999c28fd696878c31cf64ab9ec0f
4
+ data.tar.gz: ee9e039767c220e55666566ee860030d937475d5
5
5
  SHA512:
6
- metadata.gz: 48ba2625b1a4c22763cc587736d59fdcf29c7f2df11bd9dc19a9cea775dd356070db281d83fcaa4b44897c3941b708b7ab13821716e2320635b610f2424d19a7
7
- data.tar.gz: e39c7018a8b57fc5d1405d4d1cebb4fe3b4508b9b3b0c684046096b5367fb9065f49f6e2f67950ba4307b6bbe2a8ea6cf3ec5096e999227242c4daf8aa526800
6
+ metadata.gz: ad215423bc5fd9daca7b85c629c41565be5a02c85177518133b5b22a2cef360a29d706074480d5b3785e811374f1c5df0af6a02130291dba20331d92d9f7d7f2
7
+ data.tar.gz: e355d63c205242f3e0c964f99403096aded346c4a934fee65d850642624cbafd16827c264d59b422106563ea5efe4a1bd70b3bc5c9ec0de38d7605b43b1ef13a
data/lib/grizzly_ber.rb CHANGED
@@ -27,6 +27,12 @@ class GrizzlyBer
27
27
  @value = [] if isConstruct? and @value.nil?
28
28
  end
29
29
 
30
+ def find(tag)
31
+ return self if @tag == tag
32
+ return nil unless isConstruct?
33
+ @value.find{|tlv| tlv.find(tag) != nil}
34
+ end
35
+
30
36
  def decode_hex(hex_string)
31
37
  decode_binary([hex_string].pack("H*"))
32
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grizzly_ber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Balsdon
@@ -27,12 +27,12 @@ require_paths:
27
27
  - lib
28
28
  required_ruby_version: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ">="
30
+ - - '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
33
  required_rubygems_version: !ruby/object:Gem::Requirement
34
34
  requirements:
35
- - - ">="
35
+ - - '>='
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  requirements: []