Tapioca::Dsl::Compilers::FrozenRecord generates RBI files for subclasses of
FrozenRecord::Base.
For example, with the following FrozenRecord class:
# student.rb
class Student < FrozenRecord::Base
endand the following YAML file:
# students.yml
- id: 1
first_name: John
last_name: Smith
- id: 2
first_name: Dan
last_name: Lordthis compiler will produce the RBI file student.rbi with the following content:
# Student.rbi
# typed: strong
class Student
include FrozenRecordAttributeMethods
module FrozenRecordAttributeMethods
sig { returns(T.untyped) }
def first_name; end
sig { returns(T::Boolean) }
def first_name?; end
sig { returns(T.untyped) }
def id; end
sig { returns(T::Boolean) }
def id?; end
sig { returns(T.untyped) }
def last_name; end
sig { returns(T::Boolean) }
def last_name?; end
end
end