{"action":"created","comment":{"url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/comments/41467593","id":41467593,"diff_hunk":"@@ -0,0 +1,28 @@\n+module ScanBeacon\n+  class GenericIndividualAdvertiser < GenericAdvertiser\n+    def initialize(opts={})\n+      @advertising = false\n+      @parser = nil\n+      super(opts)\n+    end\n+\n+    def beacon=(value)\n+      @beacon = value\n+      update_ad\n+    end\n+\n+    def parser=(value)\n+      @parser = value\n+      update_ad\n+    end\n+\n+    def update_ad    \n+      self.ad = @parser.generate_ad(@beacon) if @parser && @beacon\n+      self.start if @advertising\n+    end\n+    \n+    def ad=(value)\n+      @ad = value\n+    end\n+  end\n+end","path":"lib/scan_beacon/generic_individual_advertiser.rb","position":28,"original_position":28,"commit_id":"3434a8d98b5f28bde96fe29f1d36dc658d132e1c","original_commit_id":"3434a8d98b5f28bde96fe29f1d36dc658d132e1c","user":{"login":"syoder","id":722743,"avatar_url":"https://avatars.githubusercontent.com/u/722743?v=3","gravatar_id":"","url":"https://api.github.com/users/syoder","html_url":"https://github.com/syoder","followers_url":"https://api.github.com/users/syoder/followers","following_url":"https://api.github.com/users/syoder/following{/other_user}","gists_url":"https://api.github.com/users/syoder/gists{/gist_id}","starred_url":"https://api.github.com/users/syoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syoder/subscriptions","organizations_url":"https://api.github.com/users/syoder/orgs","repos_url":"https://api.github.com/users/syoder/repos","events_url":"https://api.github.com/users/syoder/events{/privacy}","received_events_url":"https://api.github.com/users/syoder/received_events","type":"User","site_admin":false},"body":"Could we get away with having this be collapsed back into the `GenericAdvertiser` class?  Then the `InterleavedAdvertiser` class would just have to make sure that `beacon=` raises `NotImplemented` or otherwise makes it clear that some of the generic stuff doesn't quite apply.","created_at":"2015-10-08T01:17:02Z","updated_at":"2015-10-08T01:17:02Z","html_url":"https://github.com/RadiusNetworks/scanbeacon-gem/pull/17#discussion_r41467593","pull_request_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/comments/41467593"},"html":{"href":"https://github.com/RadiusNetworks/scanbeacon-gem/pull/17#discussion_r41467593"},"pull_request":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/17","id":47084526,"html_url":"https://github.com/RadiusNetworks/scanbeacon-gem/pull/17","diff_url":"https://github.com/RadiusNetworks/scanbeacon-gem/pull/17.diff","patch_url":"https://github.com/RadiusNetworks/scanbeacon-gem/pull/17.patch","issue_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues/17","number":17,"state":"open","locked":false,"title":"Refactor advertisers","user":{"login":"davidgyoung","id":1044849,"avatar_url":"https://avatars.githubusercontent.com/u/1044849?v=3","gravatar_id":"","url":"https://api.github.com/users/davidgyoung","html_url":"https://github.com/davidgyoung","followers_url":"https://api.github.com/users/davidgyoung/followers","following_url":"https://api.github.com/users/davidgyoung/following{/other_user}","gists_url":"https://api.github.com/users/davidgyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/davidgyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidgyoung/subscriptions","organizations_url":"https://api.github.com/users/davidgyoung/orgs","repos_url":"https://api.github.com/users/davidgyoung/repos","events_url":"https://api.github.com/users/davidgyoung/events{/privacy}","received_events_url":"https://api.github.com/users/davidgyoung/received_events","type":"User","site_admin":false},"body":"Refactor advertisers to use extend base functionality in `GenericAdvertiser`.   This allows us to combine multiple advertisers.","created_at":"2015-10-07T21:27:53Z","updated_at":"2015-10-08T01:17:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99006652cb3492fa5fccf63a4b80ce585cbcde2d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/17/commits","review_comments_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/17/comments","review_comment_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues/17/comments","statuses_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/statuses/3434a8d98b5f28bde96fe29f1d36dc658d132e1c","head":{"label":"RadiusNetworks:interleaved-advertiser","ref":"interleaved-advertiser","sha":"3434a8d98b5f28bde96fe29f1d36dc658d132e1c","user":{"login":"RadiusNetworks","id":1120426,"avatar_url":"https://avatars.githubusercontent.com/u/1120426?v=3","gravatar_id":"","url":"https://api.github.com/users/RadiusNetworks","html_url":"https://github.com/RadiusNetworks","followers_url":"https://api.github.com/users/RadiusNetworks/followers","following_url":"https://api.github.com/users/RadiusNetworks/following{/other_user}","gists_url":"https://api.github.com/users/RadiusNetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/RadiusNetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RadiusNetworks/subscriptions","organizations_url":"https://api.github.com/users/RadiusNetworks/orgs","repos_url":"https://api.github.com/users/RadiusNetworks/repos","events_url":"https://api.github.com/users/RadiusNetworks/events{/privacy}","received_events_url":"https://api.github.com/users/RadiusNetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":37746776,"name":"scanbeacon-gem","full_name":"RadiusNetworks/scanbeacon-gem","owner":{"login":"RadiusNetworks","id":1120426,"avatar_url":"https://avatars.githubusercontent.com/u/1120426?v=3","gravatar_id":"","url":"https://api.github.com/users/RadiusNetworks","html_url":"https://github.com/RadiusNetworks","followers_url":"https://api.github.com/users/RadiusNetworks/followers","following_url":"https://api.github.com/users/RadiusNetworks/following{/other_user}","gists_url":"https://api.github.com/users/RadiusNetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/RadiusNetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RadiusNetworks/subscriptions","organizations_url":"https://api.github.com/users/RadiusNetworks/orgs","repos_url":"https://api.github.com/users/RadiusNetworks/repos","events_url":"https://api.github.com/users/RadiusNetworks/events{/privacy}","received_events_url":"https://api.github.com/users/RadiusNetworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RadiusNetworks/scanbeacon-gem","description":"A Ruby gem for scanning beacons","fork":false,"url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem","forks_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/forks","keys_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/teams","hooks_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/hooks","issue_events_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues/events{/number}","events_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/events","assignees_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/assignees{/user}","branches_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/branches{/branch}","tags_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/tags","blobs_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/refs{/sha}","trees_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/statuses/{sha}","languages_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/languages","stargazers_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/stargazers","contributors_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/contributors","subscribers_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/subscribers","subscription_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/subscription","commits_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/commits{/sha}","git_commits_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/commits{/sha}","comments_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/comments{/number}","issue_comment_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues/comments{/number}","contents_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/contents/{+path}","compare_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/merges","archive_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/downloads","issues_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues{/number}","pulls_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls{/number}","milestones_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/milestones{/number}","notifications_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/labels{/name}","releases_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/releases{/id}","created_at":"2015-06-19T21:27:28Z","updated_at":"2015-10-07T20:12:31Z","pushed_at":"2015-10-07T21:27:53Z","git_url":"git://github.com/RadiusNetworks/scanbeacon-gem.git","ssh_url":"git@github.com:RadiusNetworks/scanbeacon-gem.git","clone_url":"https://github.com/RadiusNetworks/scanbeacon-gem.git","svn_url":"https://github.com/RadiusNetworks/scanbeacon-gem","homepage":null,"size":457,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"RadiusNetworks:master","ref":"master","sha":"0e1a2356ecb2d809d0db48d6f672bf22ef37ec04","user":{"login":"RadiusNetworks","id":1120426,"avatar_url":"https://avatars.githubusercontent.com/u/1120426?v=3","gravatar_id":"","url":"https://api.github.com/users/RadiusNetworks","html_url":"https://github.com/RadiusNetworks","followers_url":"https://api.github.com/users/RadiusNetworks/followers","following_url":"https://api.github.com/users/RadiusNetworks/following{/other_user}","gists_url":"https://api.github.com/users/RadiusNetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/RadiusNetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RadiusNetworks/subscriptions","organizations_url":"https://api.github.com/users/RadiusNetworks/orgs","repos_url":"https://api.github.com/users/RadiusNetworks/repos","events_url":"https://api.github.com/users/RadiusNetworks/events{/privacy}","received_events_url":"https://api.github.com/users/RadiusNetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":37746776,"name":"scanbeacon-gem","full_name":"RadiusNetworks/scanbeacon-gem","owner":{"login":"RadiusNetworks","id":1120426,"avatar_url":"https://avatars.githubusercontent.com/u/1120426?v=3","gravatar_id":"","url":"https://api.github.com/users/RadiusNetworks","html_url":"https://github.com/RadiusNetworks","followers_url":"https://api.github.com/users/RadiusNetworks/followers","following_url":"https://api.github.com/users/RadiusNetworks/following{/other_user}","gists_url":"https://api.github.com/users/RadiusNetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/RadiusNetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RadiusNetworks/subscriptions","organizations_url":"https://api.github.com/users/RadiusNetworks/orgs","repos_url":"https://api.github.com/users/RadiusNetworks/repos","events_url":"https://api.github.com/users/RadiusNetworks/events{/privacy}","received_events_url":"https://api.github.com/users/RadiusNetworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RadiusNetworks/scanbeacon-gem","description":"A Ruby gem for scanning beacons","fork":false,"url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem","forks_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/forks","keys_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/teams","hooks_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/hooks","issue_events_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues/events{/number}","events_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/events","assignees_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/assignees{/user}","branches_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/branches{/branch}","tags_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/tags","blobs_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/refs{/sha}","trees_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/statuses/{sha}","languages_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/languages","stargazers_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/stargazers","contributors_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/contributors","subscribers_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/subscribers","subscription_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/subscription","commits_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/commits{/sha}","git_commits_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/git/commits{/sha}","comments_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/comments{/number}","issue_comment_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues/comments{/number}","contents_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/contents/{+path}","compare_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/merges","archive_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/downloads","issues_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues{/number}","pulls_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls{/number}","milestones_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/milestones{/number}","notifications_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/labels{/name}","releases_url":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/releases{/id}","created_at":"2015-06-19T21:27:28Z","updated_at":"2015-10-07T20:12:31Z","pushed_at":"2015-10-07T21:27:53Z","git_url":"git://github.com/RadiusNetworks/scanbeacon-gem.git","ssh_url":"git@github.com:RadiusNetworks/scanbeacon-gem.git","clone_url":"https://github.com/RadiusNetworks/scanbeacon-gem.git","svn_url":"https://github.com/RadiusNetworks/scanbeacon-gem","homepage":null,"size":457,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/17"},"html":{"href":"https://github.com/RadiusNetworks/scanbeacon-gem/pull/17"},"issue":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues/17"},"comments":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/RadiusNetworks/scanbeacon-gem/statuses/3434a8d98b5f28bde96fe29f1d36dc658d132e1c"}}}}