lib/firebase/firebase.rb in motion-firebase-2.0.11 vs lib/firebase/firebase.rb in motion-firebase-2.0.12
- old
+ new
@@ -33,16 +33,16 @@
setDispatchQueue(queue)
end
# @example
# firebase = Firebase.new('http://..../')
- # firebase.auth('secretkey', then: ->{}, disconnect:{})
+ # firebase.auth('secretkey', completion: ->{}, disconnect:{})
# # => firebase.authWithCredential(credential)
def auth(credential, options={}, &and_then)
and_then = and_then || options[:completion]
disconnect_block = options[:disconnect]
- authWithCredential(credential, withCompletionBlock:and_then, withCancelBlock:disconnect_block)
+ authWithCredential(credential, withCompletionBlock: and_then, withCancelBlock: disconnect_block)
return self
end
def unauth(&block)
if block
@@ -68,16 +68,16 @@
transaction = transaction || options[:transaction]
completion_block = options[:completion]
with_local_events = options[:local]
if with_local_events.nil?
if completion_block
- runTransactionBlock(transaction, andCompletionBlock:completion_block)
+ runTransactionBlock(transaction, andCompletionBlock: completion_block)
else
runTransactionBlock(transaction)
end
else
- runTransactionBlock(transaction, andCompletionBlock:completion_block, withLocalEvents:with_local_events)
+ runTransactionBlock(transaction, andCompletionBlock: completion_block, withLocalEvents: with_local_events)
end
end
# @example
# firebase = Firebase.new('http://..../')
@@ -128,11 +128,11 @@
setValue(value)
end
def set(value, &and_then)
if and_then
- setValue(value, withCompletionBlock:and_then)
+ setValue(value, withCompletionBlock: and_then)
else
setValue(value)
end
return self
end
@@ -141,29 +141,29 @@
priority(value)
end
def priority(value, &and_then)
if and_then
- setPriority(value, withCompletionBlock:and_then)
+ setPriority(value, withCompletionBlock: and_then)
else
setPriority(value)
end
return self
end
- def set(value, priority:priority, &and_then)
+ def set(value, priority: priority, &and_then)
if and_then
- setValue(value, andPriority:priority, withCompletionBlock:and_then)
+ setValue(value, andPriority: priority, withCompletionBlock: and_then)
else
- setValue(value, andPriority:priority)
+ setValue(value, andPriority: priority)
end
return self
end
def update(values, &and_then)
if and_then
- updateChildValues(values, withCompletionBlock:and_then)
+ updateChildValues(values, withCompletionBlock: and_then)
else
updateChildValues(values)
end
return self
end
@@ -185,13 +185,13 @@
def on_disconnect(value, &and_then)
if and_then
if value.nil?
onDisconnectRemoveValueWithCompletionBlock(and_then)
elsif NSDictionary === value
- onDisconnectUpdateChildValues(value, withCompletionBlock:and_then)
+ onDisconnectUpdateChildValues(value, withCompletionBlock: and_then)
else
- onDisconnectSetValue(value, withCompletionBlock:and_then)
+ onDisconnectSetValue(value, withCompletionBlock: and_then)
end
else
if value == :remove
onDisconnectRemoveValue
elsif NSDictionary === value
@@ -201,14 +201,14 @@
end
end
return self
end
- def on_disconnect(value, priority:priority, &and_then)
+ def on_disconnect(value, priority: priority, &and_then)
if and_then
- onDisconnectSetValue(value, andPriority:priority, withCompletionBlock:and_then)
+ onDisconnectSetValue(value, andPriority: priority, withCompletionBlock: and_then)
else
- onDisconnectSetValue(value, andPriority:priority)
+ onDisconnectSetValue(value, andPriority: priority)
end
return self
end
def to_s