Class: Goon::Competency

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

Defined Under Namespace

Classes: InvalidCompetency

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Competency

Returns a new instance of Competency.



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

def initialize(options = {})
  @name = options[:name].to_s
  @description = options[:description].to_s || "This competency has no description"
  @body = options[:body].to_s

  validate_name!
  validate_body!
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



8
9
10
# File 'lib/goon/competency.rb', line 8

def body
  @body
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/goon/competency.rb', line 8

def name
  @name
end