class ActionView::OutputBuffer
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/action_view/buffers.rbs class ActionView::OutputBuffer < ActionView::ActiveSupport::SafeBuffer type ActionView__OutputBuffer_<<_value = ActionView::OutputBuffer | ViewComponent::Slot | String | ActiveSupport::SafeBuffer def <<: (ActionView__OutputBuffer_<<_value value) -> untyped def initialize: (*unused *) -> void end
:nodoc:
puts sbuf # => “hellou0005”
sbuf << 5
sbuf = ActiveSupport::SafeBuffer.new “hello”
puts obuf # => “hello5”
obuf << 5
obuf = ActionView::OutputBuffer.new “hello”
the input. For example:
checked for nil before they are assigned and ‘to_s` is called on
is for the methods `<<` and `safe_expr_append=` the inputs are
The main difference between this and ActiveSupport::SafeBuffer
Used as a buffer for views
def <<(value)
Experimental RBS support (using type sampling data from the type_fusion
project).
type ActionView__OutputBuffer_<<_value = ActionView::OutputBuffer | ViewComponent::Slot | String | ActiveSupport::SafeBuffer def <<: (ActionView__OutputBuffer_<<_value value) -> untyped
This signature was generated using 6 samples from 1 application.
def <<(value) return self if value.nil? super(value.to_s) end
def initialize(*)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (*unused *) -> void
This signature was generated using 8 samples from 1 application.
puts sbuf # => "hello\u0005"
sbuf << 5
sbuf = ActiveSupport::SafeBuffer.new "hello"
puts obuf # => "hello5"
obuf << 5
obuf = ActionView::OutputBuffer.new "hello"
the input. For example:
checked for nil before they are assigned and `to_s` is called on
is for the methods `<<` and `safe_expr_append=` the inputs are
The main difference between this and ActiveSupport::SafeBuffer
Used as a buffer for views
def initialize(*) super encode! end
def safe_expr_append=(val)
def safe_expr_append=(val) return self if val.nil? safe_concat val.to_s end