Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed some methods to make their intent more clear

  • Loading branch information...
commit c6c367e0c8f7f9fd52d35352799baad6379744d6 1 parent 68490ea
Ary Borenszweig asterite authored
2  Gemfile.lock
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- em-msn (0.4)
+ em-msn (0.6)
eventmachine
guid
nokogiri
3  README.md
View
@@ -43,7 +43,8 @@ MSN client (EventMachine + Ruby)
msn.on_contact_request do |email, display_name|
puts "Contact request from #{display_name} <#{email}>"
- msn.add_contact email
+ msn.add_to_friends_list email
+ msn.add_to_allowed_list email
end
msn.connect
20 lib/msn/messenger.rb
View
@@ -45,24 +45,24 @@ def set_online_status(status)
end
end
- # Adds a contact. Technically, this adds it to your Friends List.
- def add_contact(email)
+ # Adds a contact to your friends list.
+ def add_to_friends_list(email)
send_contact_command email, 'ADL', '1'
end
- # Removes a contact. Technically, this removes it from your Friends List.
- def remove_contact(email)
+ # Removes a contact from your friends list.
+ def remove_from_friends_list(email)
send_contact_command email, 'RML', '1'
end
- # Blocks a contact. Technically, this removes it from your Allowed List.
- def block_contact(email)
- send_contact_command email, 'RML', '2'
+ # Adds a contact to your allowed list.
+ def add_to_allowed_list(email)
+ send_contact_command email, 'ADL', '2'
end
- # Unblocks a contact. Technically, this adds it to your Allowed List.
- def unblock_contact(email)
- send_contact_command email, 'ADL', '2'
+ # Removes a contact from your allowed list.
+ def remove_from_allowed_list(email)
+ send_contact_command email, 'RML', '2'
end
# Returns all contacts associated to this Messenger account.
2  lib/msn/version.rb
View
@@ -1,3 +1,3 @@
module Msn
- VERSION = "0.5"
+ VERSION = "0.6"
end
Please sign in to comment.
Something went wrong with that request. Please try again.