Module: Instructor::Core

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/instructor/concerns/core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



8
9
10
# File 'lib/instructor/concerns/core.rb', line 8

def input
  @input
end

Instance Method Details

#initialize(**input) ⇒ Object



10
11
12
13
14
15
# File 'lib/instructor/concerns/core.rb', line 10

def initialize(**input)
  @input = input
  run_callbacks(:initialize) do
    input.each { |key, value| __send__("#{key}=".to_sym, value) }
  end
end