module FbGraph2::AttributeAssigner::ClassMethods

Attributes

registered_attributes[R]

Public Instance Methods

inherited(child) click to toggle source
Calls superclass method
# File lib/fb_graph2/attribute_assigner.rb, line 13
def inherited(child)
  super
  child.register_attributes registered_attributes
end
register_attributes(attributes) click to toggle source
# File lib/fb_graph2/attribute_assigner.rb, line 22
def register_attributes(attributes)
  attributes.each do |type, keys|
    registered_attributes[type] ||= []
    registered_attributes[type] += keys
  end
  send :attr_accessor, *attributes.values.flatten
end