Class: AtCoderFriends::Generator::CxxIostreamDeclFragment
- Inherits:
-
InputFormatFragment
- Object
- InputFormatFragment
- AtCoderFriends::Generator::CxxIostreamDeclFragment
- Defined in:
- lib/at_coder_friends/generator/cxx_iostream.rb
Overview
C++ variable declaration generator
Instance Attribute Summary collapse
-
#root_container ⇒ Object
Returns the value of attribute root_container.
Instance Method Summary collapse
Instance Attribute Details
#root_container ⇒ Object
Returns the value of attribute root_container.
10 11 12 |
# File 'lib/at_coder_friends/generator/cxx_iostream.rb', line 10 def root_container @root_container end |
Instance Method Details
#components ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/at_coder_friends/generator/cxx_iostream.rb', line 24 def components @components ||= super&.map do |cmp| cmp.tap do |c| c.root_container = container end end end |
#generate(func) ⇒ Object
12 13 14 |
# File 'lib/at_coder_friends/generator/cxx_iostream.rb', line 12 def generate(func) render(func) end |
#vars ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/at_coder_friends/generator/cxx_iostream.rb', line 16 def vars @vars ||= super.map do |var| var.tap do |var| var.root_container = root_container end end end |