Method: CIMI::Service::Base#initialize
- Defined in:
- lib/cimi/service/base.rb
#initialize(context, opts) ⇒ Base
Returns a new instance of Base.
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/cimi/service/base.rb', line 62 def initialize(context, opts) if opts[:values] @model = model_class.new(opts[:values]) elsif opts[:model] @model = opts[:model] else @model = model_class.new({}) end @context = context retrieve_entity end |