Module: CPEE::Instantiation

Defined in:
lib/cpee/instantiation.rb

Defined Under Namespace

Modules: Helpers Classes: HandleInstance, InstantiateUrl, InstantiateXML

Constant Summary collapse

SERVER =
File.expand_path(__dir__ + '/../instantiation.xml')

Class Method Summary collapse

Class Method Details

.implementation(opts) ⇒ Object

}}}



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/cpee/instantiation.rb', line 194

def self::implementation(opts)
  opts[:cpee] ||= 'http://localhost:9298/'
  Proc.new do
    on resource do
      run InstantiateXML, opts[:cpee],true if post 'xmlsimple'
      on resource 'xml' do
        run InstantiateXML, opts[:cpee], false if post 'xml'
      end
      on resource 'url' do
        run InstantiateUrl, opts[:cpee] if post 'url'
      end
      on resource 'instance' do
        run HandleInstance, opts[:cpee] if post 'instance'
      end
    end
  end
end