Module: SocialStream::Models::Supertype::ClassMethods

Defined in:
lib/social_stream/models/supertype.rb

Instance Method Summary collapse

Instance Method Details

#load_subtype_featuresObject



19
20
21
22
23
24
25
26
# File 'lib/social_stream/models/supertype.rb', line 19

def load_subtype_features
  features = "SocialStream::Models::#{ to_s }".constantize

  subtypes.each do |s|
    s = s.to_s.classify.constantize
    s.__send__(:include, features) unless s.ancestors.include?(features)
  end
end

#subtypesObject



15
16
17
# File 'lib/social_stream/models/supertype.rb', line 15

def subtypes
  SocialStream.__send__ to_s.tableize
end