Class: StringBuilder
- Inherits:
-
Object
- Object
- StringBuilder
- Defined in:
- lib/kube/ctl/string_builder.rb
Instance Method Summary collapse
-
#call(token = nil, **kwargs) ⇒ Object
Override call to handle kwargs: .(description: ‘my frontend’) stores [“my frontend”] in the buffer.
Instance Method Details
#call(token = nil, **kwargs) ⇒ Object
Override call to handle kwargs: .(description: ‘my frontend’) stores [“my frontend”] in the buffer.
12 13 14 15 16 17 18 19 20 |
# File 'lib/kube/ctl/string_builder.rb', line 12 def call(token = nil, **kwargs) tap do if token @buffer << [token.to_s, []] elsif kwargs.any? @buffer << [kwargs] end end end |