Class: Goon::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/goon/task.rb

Defined Under Namespace

Classes: InvalidTask

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Task

Returns a new instance of Task.



9
10
11
12
13
14
15
16
# File 'lib/goon/task.rb', line 9

def initialize(options = {})
  @name = options[:name]
  @description = options[:description]
  @body = options[:body]

  validate_name!
  validate_body!
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



7
8
9
# File 'lib/goon/task.rb', line 7

def body
  @body
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/goon/task.rb', line 7

def name
  @name
end