lib/notifier/adapters/gntp.rb in notifier-0.5.1 vs lib/notifier/adapters/gntp.rb in notifier-0.5.2
- old
+ new
@@ -6,11 +6,11 @@
attr_accessor :port
attr_accessor :password
def initialize(options = {})
if options.kind_of?(String)
- options = {:name => options}
+ options = {name: options}
end
@application_name = options.fetch(:name, "GNTP/Ruby")
@host = options.fetch(:host, "127.0.0.1")
@port = options.fetch(:port, 23053)
@@ -62,12 +62,12 @@
def fetch_icon(path)
contents = File.open(path, "rb") {|f| f.read }
{
- :identifier => Digest::MD5.hexdigest(contents),
- :contents => contents,
- :size => contents.bytesize
+ identifier: Digest::MD5.hexdigest(contents),
+ contents: contents,
+ size: contents.bytesize
}
end
def bool(boolean)
{true => "Yes", false => "No"}[boolean]