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 | ActiveSupport::SafeBuffer | ViewComponent::Slot | String | Gem::Version | Array[String] | ClassDefinition | Float | Integer | nil | InstanceMethod | ModuleDefinition
  
  def <<: (ActionView__OutputBuffer_<<_value value) -> ActionView::OutputBuffer
  def initialize: (*unused *) -> void
  def safe_expr_append=: (String val) -> ActionView::OutputBuffer
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 | ActiveSupport::SafeBuffer | ViewComponent::Slot | String | Gem::Version | Array[String] | ClassDefinition | Float | Integer | nil | InstanceMethod | ModuleDefinition
type ActionView__OutputBuffer_<<_value = ActionView::OutputBuffer | ActiveSupport::SafeBuffer | ViewComponent::Slot | String | Gem::Version |  | ClassDefinition | Float | Integer | nil | InstanceMethod | ModuleDefinition

def <<: (ActionView__OutputBuffer_<<_value value) -> ActionView::OutputBuffer

This signature was generated using 313 samples from 2 applications.

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 128 samples from 2 applications.

:nodoc:

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)

Experimental RBS support (using type sampling data from the type_fusion project).

def safe_expr_append=: (String val) -> ActionView::OutputBuffer

This signature was generated using 1 sample from 1 application.

def safe_expr_append=(val)
  return self if val.nil?
  safe_concat val.to_s
end