class GoonModelGen::Source::Struct
Attributes
id_name[RW]
id_type[RW]
ref_name[RW]
Public Instance Methods
fields()
click to toggle source
# File lib/goon_model_gen/source/struct.rb, line 12 def fields @fields ||= [] end
new_field(name, attrs)
click to toggle source
@param name [string] @param attrs [Hash<String,Object>]
# File lib/goon_model_gen/source/struct.rb, line 18 def new_field(name, attrs) Field.new(name, attrs).tap do |f| f.context = self.context self.fields.push(f) end end