Class: Bluplate::Task

Inherits:
Object
  • Object
show all
Includes:
Persist::Base
Defined in:
lib/bluplate/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Persist::Base

included, #save

Constructor Details

#initialize(user_email, description) ⇒ Task

Returns a new instance of Task.



7
8
9
10
11
# File 'lib/bluplate/task.rb', line 7

def initialize(user_email, description)
  @user_email = user_email
  @description = description
  @tags ||= {}
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/bluplate/task.rb', line 5

def description
  @description
end

#tagsObject

Returns the value of attribute tags.



5
6
7
# File 'lib/bluplate/task.rb', line 5

def tags
  @tags
end

#user_emailObject

Returns the value of attribute user_email.



5
6
7
# File 'lib/bluplate/task.rb', line 5

def user_email
  @user_email
end

Instance Method Details

#to_hashObject



13
14
15
# File 'lib/bluplate/task.rb', line 13

def to_hash
  {:tags => @tags, :user_email => @user_email, :description => @description}
end