Class: Swift::Playground::Section::TemplateContext
- Inherits:
-
Object
- Object
- Swift::Playground::Section::TemplateContext
- Extended by:
- Forwardable
- Defined in:
- lib/swift/playground/section.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#number ⇒ Object
Returns the value of attribute number.
Class Method Summary collapse
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(content, number, playground) ⇒ TemplateContext
constructor
A new instance of TemplateContext.
Constructor Details
#initialize(content, number, playground) ⇒ TemplateContext
Returns a new instance of TemplateContext.
26 27 28 29 30 |
# File 'lib/swift/playground/section.rb', line 26 def initialize(content, number, playground) @content = content @number = number @playground = playground end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
13 14 15 |
# File 'lib/swift/playground/section.rb', line 13 def content @content end |
#number ⇒ Object
Returns the value of attribute number.
13 14 15 |
# File 'lib/swift/playground/section.rb', line 13 def number @number end |
Class Method Details
.context(*args) ⇒ Object
18 19 20 |
# File 'lib/swift/playground/section.rb', line 18 def self.context(*args) new(*args).instance_eval { binding } end |
Instance Method Details
#context ⇒ Object
22 23 24 |
# File 'lib/swift/playground/section.rb', line 22 def context binding end |