Class: Gorillib::Builder::MemberField

Inherits:
Model::Field show all
Defined in:
lib/gorillib/builder.rb

Instance Attribute Summary

Attributes inherited from Model::Field

#_extra_attributes, #doc, #model, #name, #type

Instance Method Summary collapse

Methods inherited from Model::Field

#==, #initialize, #inspect, #inspect_compact, receive, #to_hash, #to_s, #visibility

Methods included from Model

#==, #as_json, #attribute_set?, #attribute_values, #attributes, #compact_attributes, #handle_extra_attributes, #initialize, #inspect, #inspect_compact, #read_attribute, #read_unset_attribute, #receive!, #to_inspectable, #to_json, #to_s, #to_tsv, #to_wire, #unset_attribute, #update_attributes, #write_attribute

Methods included from Concern

#append_features, extended, #included

Constructor Details

This class inherits a constructor from Gorillib::Model::Field

Instance Method Details

#inscribe_methods(model) ⇒ Object



205
206
207
208
209
210
# File 'lib/gorillib/builder.rb', line 205

def inscribe_methods(model)
  model.__send__(:define_member_getset,      self)
  model.__send__(:define_attribute_writer,   self.name, self.type, visibility(:writer))
  model.__send__(:define_attribute_tester,   self.name, self.type, visibility(:tester))
  model.__send__(:define_attribute_receiver, self.name, self.type, visibility(:receiver))
end