Sha256: 56d0bdd8759c34c96595fe862f504c26e6095e0c192177433783c635d4a3287e
Contents?: true
Size: 535 Bytes
Versions: 16
Compression:
Stored size: 535 Bytes
Contents
require "goon_model_gen" require "goon_model_gen/source/type" require "goon_model_gen/source/field" module GoonModelGen module Source class Struct < Type attr_accessor :id_name, :id_type attr_accessor :ref_name def fields @fields ||= [] end # @param name [string] # @param attrs [Hash<String,Object>] def new_field(name, attrs) Field.new(name, attrs).tap do |f| f.context = self.context self.fields.push(f) end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems