Class: Rails::On::Sorbet::ActiveRecordSerializer::Definition

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/on/sorbet/active_record_serializer.rb

Overview

Contains the data of a serializer definition

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, coder:, return_type: nil, setter_type: nil, doc: nil) ⇒ Definition

: (name: Symbol, coder: untyped, ?return_type: untyped, ?setter_type: untyped, ?doc: String?) -> void



21
22
23
24
25
26
27
# File 'lib/rails/on/sorbet/active_record_serializer.rb', line 21

def initialize(name:, coder:, return_type: nil, setter_type: nil, doc: nil)
  @name = name
  @coder = coder
  @return_type = return_type
  @setter_type = setter_type
  @doc = doc
end

Instance Attribute Details

#coderObject (readonly)

: untyped



12
13
14
# File 'lib/rails/on/sorbet/active_record_serializer.rb', line 12

def coder
  @coder
end

#docObject (readonly)

: String?



18
19
20
# File 'lib/rails/on/sorbet/active_record_serializer.rb', line 18

def doc
  @doc
end

#nameObject (readonly)

: Symbol



10
11
12
# File 'lib/rails/on/sorbet/active_record_serializer.rb', line 10

def name
  @name
end

#return_typeObject (readonly)

: Object



14
15
16
# File 'lib/rails/on/sorbet/active_record_serializer.rb', line 14

def return_type
  @return_type
end

#setter_typeObject (readonly)

: Object



16
17
18
# File 'lib/rails/on/sorbet/active_record_serializer.rb', line 16

def setter_type
  @setter_type
end