Sha256: 772463fd9ec7c6cad86b02c7c5fa60ef20a85c5634bdead54d5e36ec82d904b7

Contents?: true

Size: 238 Bytes

Versions: 1

Compression:

Stored size: 238 Bytes

Contents

# frozen_string_literal: true

module InertiaRails
  # Base class for all props.
  class BaseProp
    def initialize(&block)
      @block = block
    end

    def call(controller)
      controller.instance_exec(&@block)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inertia_rails-3.5.0 lib/inertia_rails/base_prop.rb