class Apigen::ReferenceType

ReferenceType represents a reference to a model.

Attributes

model_name[R]

Public Class Methods

new(model_name) click to toggle source
# File lib/apigen/models/reference_type.rb, line 11
def initialize(model_name)
  @model_name = model_name
end

Public Instance Methods

==(other) click to toggle source
# File lib/apigen/models/reference_type.rb, line 19
def ==(other)
  other.is_a?(ReferenceType) && other.model_name == model_name
end
to_s() click to toggle source
# File lib/apigen/models/reference_type.rb, line 23
def to_s
  @model_name.to_s
end
validate(model_registry) click to toggle source
# File lib/apigen/models/reference_type.rb, line 15
def validate(model_registry)
  raise "Model :#{@model_name} is not defined." unless model_registry.models.key? @model_name
end