Uses attribute reader instead of accessor

This commit is contained in:
Muhammad Nawzad
2023-11-13 15:50:28 +03:00
parent dcfc80d9ad
commit b8928ee1ea
10 changed files with 21 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
module Schemable
class AttributeSchemaGenerator
attr_accessor :model_definition, :configuration, :model, :schema_modifier, :response
attr_reader :model_definition, :configuration, :model, :schema_modifier, :response
def initialize(model_definition)
@model_definition = model_definition

View File

@@ -1,6 +1,6 @@
module Schemable
class IncludedSchemaGenerator
attr_accessor :model_definition, :schema_modifier, :relationships
attr_reader :model_definition, :schema_modifier, :relationships
def initialize(model_definition)
@model_definition = model_definition

View File

@@ -1,6 +1,6 @@
module Schemable
class RelationshipSchemaGenerator
attr_accessor :model_definition, :schema_modifier, :relationships
attr_reader :model_definition, :schema_modifier, :relationships
def initialize(model_definition)
@model_definition = model_definition

View File

@@ -1,6 +1,6 @@
module Schemable
class RequestSchemaGenerator
attr_accessor :model_definition, :schema_modifier
attr_reader :model_definition, :schema_modifier
def initialize(model_definition)
@model_definition = model_definition

View File

@@ -1,6 +1,6 @@
module Schemable
class ResponseSchemaGenerator
attr_accessor :model_definition, :model
attr_reader :model_definition, :model, :schema_modifier
def initialize(model_definition)
@model_definition = model_definition