module DTK::DSL::InputOutputCommon::OutputClassMixin
Public Instance Methods
create(opts = {})
click to toggle source
opts can have keys
:output_type :input
In both cases an empty object is created using :output_type or type of :input to determine its type
# File lib/dsl/input_output_common/output_class_mixin.rb, line 25 def create(opts = {}) unless opts[:output_type] or opts[:input] raise Error, "opts must have one of the keys :output_type or :input" end obj_type = opts[:output_type] || obj_type(opts[:input]) create_aux(obj_type) end