Class: MrMurano::SolutionBase
- Inherits:
-
Object
- Object
- MrMurano::SolutionBase
- Includes:
- Http, SyncUpDown, Verbose
- Defined in:
- lib/MrMurano/Solution.rb
Direct Known Subclasses
Cors, Endpoint, File, ServiceBase, ServiceConfig, Services, Solution, UserBase
Instance Method Summary collapse
-
#endPoint(path = '') ⇒ Object
Generate an endpoint in Murano Uses the uriparts and path.
-
#initialize ⇒ SolutionBase
constructor
A new instance of SolutionBase.
Methods included from SyncUpDown
#docmp, #dodiff, #download, #ignoring, #list, #localitems, #locallist, #remove, #removelocal, #searchFor, #status, #syncdown, #synckey, #syncup, #toRemoteItem, #tolocalname, #tolocalpath, #upload
Methods included from Verbose
#debug, #error, #outf, #tabularize, #verbose, #warning
Methods included from Http
#curldebug, #delete, #get, #http, #http_reset, #isJSON, #json_opts, #post, #postf, #put, #set_def_headers, #showHttpError, #token, #workit
Constructor Details
#initialize ⇒ SolutionBase
Returns a new instance of SolutionBase.
9 10 11 12 13 14 15 16 |
# File 'lib/MrMurano/Solution.rb', line 9 def initialize @sid = $cfg['solution.id'] raise "No solution!" if @sid.nil? @uriparts = [:solution, @sid] @itemkey = :id @locationbase = $cfg['location.base'] @location = nil end |
Instance Method Details
#endPoint(path = '') ⇒ Object
Generate an endpoint in Murano Uses the uriparts and path
25 26 27 28 29 |
# File 'lib/MrMurano/Solution.rb', line 25 def endPoint(path='') parts = ['https:/', $cfg['net.host'], 'api:1'] + @uriparts s = parts.map{|v| v.to_s}.join('/') URI(s + path.to_s) end |