Class: Simnos::DSL::Topic

Inherits:
Object
  • Object
show all
Includes:
TemplateHelper
Defined in:
lib/simnos/dsl/topic.rb

Defined Under Namespace

Classes: Result

Instance Method Summary collapse

Methods included from TemplateHelper

#context, #include_template

Constructor Details

#initialize(context, name, &block) ⇒ Topic

Returns a new instance of Topic.



134
135
136
137
138
139
140
141
142
# File 'lib/simnos/dsl/topic.rb', line 134

def initialize(context, name, &block)
  @name = name
  @context = context.merge(name: name)

  @result = Result.new(@context)
  @result.name = name

  instance_eval(&block)
end

Instance Method Details

#resultObject



144
145
146
# File 'lib/simnos/dsl/topic.rb', line 144

def result
  @result
end