Class: Enrico::VacationDay

Inherits:
Object
  • Object
show all
Defined in:
lib/enrico/vacation_day.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ VacationDay

Returns a new instance of VacationDay.



8
9
10
11
12
# File 'lib/enrico/vacation_day.rb', line 8

def initialize(args)
  self.date         = Date.new( args["date"]["year"].to_i, args["date"]["month"].to_i, args["date"]["day"].to_i  )
  self.local_name   = args["localName"]
  self.english_name = args["englishName"]
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



6
7
8
# File 'lib/enrico/vacation_day.rb', line 6

def date
  @date
end

#english_nameObject

Returns the value of attribute english_name.



6
7
8
# File 'lib/enrico/vacation_day.rb', line 6

def english_name
  @english_name
end

#local_nameObject

Returns the value of attribute local_name.



6
7
8
# File 'lib/enrico/vacation_day.rb', line 6

def local_name
  @local_name
end