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.



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

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

Instance Method Details

#decoration(terms, visitor) ⇒ Object



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

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