Class: Bananajour::Bonjour::BananajourBrowser
- Inherits:
-
Object
- Object
- Bananajour::Bonjour::BananajourBrowser
- Defined in:
- lib/bananajour/bonjour/bananajour_browser.rb
Instance Method Summary collapse
- #bananajours ⇒ Object
-
#initialize ⇒ BananajourBrowser
constructor
A new instance of BananajourBrowser.
- #other_bananajours ⇒ Object
Constructor Details
#initialize ⇒ BananajourBrowser
Returns a new instance of BananajourBrowser.
4 5 6 |
# File 'lib/bananajour/bonjour/bananajour_browser.rb', line 4 def initialize @browser = Browser.new('_http._tcp,_bananajour') end |
Instance Method Details
#bananajours ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/bananajour/bonjour/bananajour_browser.rb', line 8 def bananajours @browser.replies.map do |reply| Person.new( reply.text_record["name"], reply.text_record["email"], reply.text_record["uri"], reply.text_record["gravatar"] ) end end |
#other_bananajours ⇒ Object
19 20 21 |
# File 'lib/bananajour/bonjour/bananajour_browser.rb', line 19 def other_bananajours bananajours.reject {|b| b.uri == Bananajour.web_uri} end |