Class: Joey::Profile

Inherits:
Model
  • Object
show all
Defined in:
lib/joey/profile.rb

Direct Known Subclasses

Page, User

Instance Attribute Summary

Attributes inherited from Model

#client, #errors

Instance Method Summary collapse

Methods inherited from Model

define_properties, find, get_all, has_association, hash_populating_accessor, hash_populating_association, #initialize, recognize?

Constructor Details

This class inherits a constructor from Joey::Model

Instance Method Details

#to_sObject



19
20
21
# File 'lib/joey/profile.rb', line 19

def to_s
  name
end

#valid?Boolean

Returns:

  • (Boolean)


27
28
29
30
31
# File 'lib/joey/profile.rb', line 27

def valid?
  self.validate
  puts self.errors.inspect unless self.errors.empty?
  self.errors.empty?
end

#validateObject



23
24
25
# File 'lib/joey/profile.rb', line 23

def validate
  valid = true
end