Class: Rel
- Inherits:
-
Object
- Object
- Rel
- Defined in:
- lib/rel/model.rb,
lib/rel.rb
Overview
Mapper for Bandicoot relations.
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #get(fn) ⇒ Object
-
#initialize(url = "http://localhost:12345") ⇒ Rel
constructor
A new instance of Rel.
- #post(fn, hashes) ⇒ Object
Constructor Details
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
33 34 35 |
# File 'lib/rel.rb', line 33 def client @client end |
Instance Method Details
#get(fn) ⇒ Object
40 41 42 |
# File 'lib/rel.rb', line 40 def get(fn) _csv_to_hashes(client.get(fn)) end |
#post(fn, hashes) ⇒ Object
44 45 46 |
# File 'lib/rel.rb', line 44 def post(fn, hashes) _csv_to_hashes(client.post(fn, _hashes_to_csv(hashes.dup))) end |