Class: Source
- Inherits:
-
Object
- Object
- Source
- Defined in:
- lib/source.rb
Instance Method Summary collapse
- #get(source_id) ⇒ Object
-
#initialize(clientw) ⇒ Source
constructor
A new instance of Source.
- #list ⇒ Object
Constructor Details
#initialize(clientw) ⇒ Source
Returns a new instance of Source.
5 6 7 |
# File 'lib/source.rb', line 5 def initialize(clientw) @clientw = clientw end |
Instance Method Details
#get(source_id) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/source.rb', line 14 def get(source_id) query = { "source_id" => source_id } resp = @clientw.get("source", query) return resp['data'] end |
#list ⇒ Object
9 10 11 12 |
# File 'lib/source.rb', line 9 def list() resp = @clientw.get("sources") return resp['data'] end |