rbupnptools 0.1.0

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/lib/usn.rb ADDED
@@ -0,0 +1,31 @@
1
+ class Usn
2
+ def initialize(udn, st)
3
+ @udn = udn
4
+ @st = st
5
+ end
6
+
7
+ def udn
8
+ @udn
9
+ end
10
+
11
+ def st
12
+ @st
13
+ end
14
+
15
+ def to_s
16
+ if st.to_s.empty?
17
+ return udn
18
+ end
19
+ return "#{udn}::#{st}"
20
+ end
21
+ end
22
+
23
+ def Usn.read(text)
24
+ tokens = text.split '::', 2
25
+ udn = tokens[0]
26
+ st = ''
27
+ if tokens.length == 2
28
+ st = tokens[1]
29
+ end
30
+ return Usn.new udn, st
31
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rbupnptools
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - bjtj
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-09-09 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: ruby upnp tools
14
+ email: bjtj10@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/http_header.rb
20
+ - lib/ssdp.rb
21
+ - lib/upnp_control_point.rb
22
+ - lib/upnp_event.rb
23
+ - lib/upnp_model.rb
24
+ - lib/upnp_server.rb
25
+ - lib/upnp_soap.rb
26
+ - lib/upnp_xml.rb
27
+ - lib/usn.rb
28
+ homepage: https://github.com/bjtj/rb-upnp-tools
29
+ licenses:
30
+ - MIT
31
+ metadata: {}
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubyforge_project:
48
+ rubygems_version: 2.7.6
49
+ signing_key:
50
+ specification_version: 4
51
+ summary: ruby upnp tools
52
+ test_files: []