Module: AsyncapiCable::Adapters::Minitest::DSL::ClassMethods
- Defined in:
- lib/asyncapi_cable/adapters/minitest.rb
Instance Method Summary collapse
Instance Method Details
#asyncapi_schema(name) ⇒ Object
18 19 20 |
# File 'lib/asyncapi_cable/adapters/minitest.rb', line 18 def asyncapi_schema(name) self._asyncapi_schema_name = name.to_sym end |
#channel(stream_template, channel_class: nil, &block) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/asyncapi_cable/adapters/minitest.rb', line 22 def channel(stream_template, channel_class: nil, &block) context = Dsl::ChannelContext.new( stream_template, channel_class: channel_class, schema_name: _asyncapi_schema_name ) context.instance_eval(&block) if block self._asyncapi_contexts = _asyncapi_contexts + [context] Dsl::MetadataStore.register(context) context end |