Method: CodeLabs::Lab#initialize
- Defined in:
- lib/code_labs/lab.rb
#initialize(arguments = {}) ⇒ Lab
15 16 17 18 19 20 21 22 |
# File 'lib/code_labs/lab.rb', line 15 def initialize(arguments={}) # default values @duration = "N/A" = "N/A" @techs = [] # Mass assignment arguments.each {|key, value| self.send("#{key}=", value) unless value == "" || value.nil?} # <- do not set the values if they are blank end |