module Instructor::Attributes

Public Instance Methods

define_attribute(attribute) click to toggle source
# File lib/instructor/concerns/attributes.rb, line 22
def define_attribute(attribute)
  _attributes << attribute

  attr_accessor attribute
  define_attribute_methods attribute
end
inherited(base) click to toggle source
Calls superclass method
# File lib/instructor/concerns/attributes.rb, line 15
def inherited(base)
  base._attributes = _attributes.dup
  super
end

Private Instance Methods

stringable_attributes() click to toggle source
# File lib/instructor/concerns/attributes.rb, line 33
def stringable_attributes
  self.class._attributes
end