Class: MrMurano::ServiceConfig
- Inherits:
-
SolutionBase
- Object
- SolutionBase
- MrMurano::ServiceConfig
- Defined in:
- lib/MrMurano/Solution-ServiceConfig.rb
Overview
…/serviceconfig
Direct Known Subclasses
Instance Method Summary collapse
- #fetch(id) ⇒ Object
-
#initialize ⇒ ServiceConfig
constructor
A new instance of ServiceConfig.
- #list ⇒ Object
- #scid ⇒ Object
- #scid_for_name(name) ⇒ Object
Methods inherited from SolutionBase
#docmp, #dodiff, #download, #endPoint, #localitems, #locallist, #removelocal, #status, #syncdown, #synckey, #syncup, #toRemoteItem, #tolocalname, #tolocalpath
Methods included from Verbose
Methods included from Http
#curldebug, #delete, #get, #http, #http_reset, #json_opts, #post, #postf, #put, #set_def_headers, #showHttpError, #token, #tryToPrettyJSON, #workit
Constructor Details
#initialize ⇒ ServiceConfig
Returns a new instance of ServiceConfig.
6 7 8 9 |
# File 'lib/MrMurano/Solution-ServiceConfig.rb', line 6 def initialize super @uriparts << 'serviceconfig' end |
Instance Method Details
#fetch(id) ⇒ Object
14 15 16 |
# File 'lib/MrMurano/Solution-ServiceConfig.rb', line 14 def fetch(id) get('/' + id.to_s) end |
#list ⇒ Object
11 12 13 |
# File 'lib/MrMurano/Solution-ServiceConfig.rb', line 11 def list get()[:items] end |
#scid ⇒ Object
24 25 26 27 |
# File 'lib/MrMurano/Solution-ServiceConfig.rb', line 24 def scid return @scid unless @scid.nil? @scid = scid_for_name(@serviceName) end |
#scid_for_name(name) ⇒ Object
18 19 20 21 22 |
# File 'lib/MrMurano/Solution-ServiceConfig.rb', line 18 def scid_for_name(name) name = name.to_s unless name.kind_of? String scr = list().select{|i| i[:service] == name}.first scid = scr[:id] end |