Class: Command::ContextBoundary

Inherits:
SetItem
  • Object
show all
Defined in:
lib/command-set/structural.rb

Instance Method Summary collapse

Methods inherited from SetItem

#each_command, #visit

Constructor Details

#initialize(decorate, context) ⇒ ContextBoundary

Returns a new instance of ContextBoundary.



221
222
223
224
# File 'lib/command-set/structural.rb', line 221

def initialize(decorate, context)
  super(decorate)
  @context = context
end

Instance Method Details

#decoration(terms, visitor) ⇒ Object



226
227
228
# File 'lib/command-set/structural.rb', line 226

def decoration(terms, visitor)
  visitor.subject_context << @context
end