Class: OperaContacts::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/opera-contacts/contacts.rb

Direct Known Subclasses

Contact, ContactFolder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name, created = Time.new, description = '') ⇒ Item

Returns a new instance of Item.



6
7
8
9
10
11
# File 'lib/opera-contacts/contacts.rb', line 6

def initialize(id, name, created=Time.new, description='')
  @id = id
  @name = name
  @created = created
  @description = description
end

Instance Attribute Details

#createdObject

Returns the value of attribute created.



5
6
7
# File 'lib/opera-contacts/contacts.rb', line 5

def created
  @created
end

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/opera-contacts/contacts.rb', line 5

def description
  @description
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/opera-contacts/contacts.rb', line 5

def id
  @id
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/opera-contacts/contacts.rb', line 5

def name
  @name
end