Module: Firebase
- Defined in:
- lib/firebase.rb,
lib/firebase/request.rb
Defined Under Namespace
Classes: Request
Class Attribute Summary collapse
-
.auth ⇒ Object
Returns the value of attribute auth.
-
.base_uri ⇒ Object
Returns the value of attribute base_uri.
Class Method Summary collapse
-
.delete(path) ⇒ Object
Deletes the data at path and returs true.
-
.get(path) ⇒ Object
Returns the data at path.
-
.push(path, data) ⇒ Object
Writes the data, returns the key name of the data added Firebase.push('users', { 'age' => 18}) => "name":"-INOQPH-aV_psbk3ZXEX".
-
.set(path, data) ⇒ Object
Writes and returns the data Firebase.set('users/info', { 'name' => 'Oscar' }) => { 'name' => 'Oscar' }.
-
.update(path, data) ⇒ Object
Write the data at path but does not delete ommited children.
Class Attribute Details
.auth ⇒ Object
Returns the value of attribute auth.
7 8 9 |
# File 'lib/firebase.rb', line 7 def auth @auth end |
.base_uri ⇒ Object
Returns the value of attribute base_uri.
7 8 9 |
# File 'lib/firebase.rb', line 7 def base_uri @base_uri end |
Class Method Details
.delete(path) ⇒ Object
Deletes the data at path and returs true
38 39 40 |
# File 'lib/firebase.rb', line 38 def delete(path) Firebase::Request.delete(path) end |
.get(path) ⇒ Object
Returns the data at path
27 28 29 |
# File 'lib/firebase.rb', line 27 def get(path) Firebase::Request.get(path) end |
.push(path, data) ⇒ Object
Writes the data, returns the key name of the data added Firebase.push('users', { 'age' => 18}) => "name":"-INOQPH-aV_psbk3ZXEX"
33 34 35 |
# File 'lib/firebase.rb', line 33 def push(path, data) Firebase::Request.post(path, data) end |