Method: Sycl::Array#render_values_inline!
- Defined in:
- lib/sycl.rb
#render_values_inline! ⇒ Object
Keep rendering this array in block (multi-line) style, but, make this array’s children rendered in inline/flow style.
Example:
a = Sycl::Array::from_array ['one', {'two' => ['three']}]
a.yaml_postprocessor { |yaml| yaml.sub(/\A---\s+/, '') }
a.render_values_inline!
puts a.to_yaml # output: "- one\n- two: [three]"
a.render_inline!
puts a.to_yaml # output: '[one, {two: [three]}]'
280 281 282 283 284 |
# File 'lib/sycl.rb', line 280 def render_values_inline! self.each do |e| e.render_inline! if e.respond_to?(:render_inline!) end end |