Class: Swift::Playground::TemplateContext

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/swift/playground.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(playground) ⇒ TemplateContext

Returns a new instance of TemplateContext.



20
21
22
# File 'lib/swift/playground.rb', line 20

def initialize(playground)
  @playground = playground
end

Class Method Details

.context(*args) ⇒ Object



16
17
18
# File 'lib/swift/playground.rb', line 16

def self.context(*args)
  new(*args).instance_eval { binding }
end