Class: Worked::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/worked/reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dateObject

Returns the value of attribute date

Returns:

  • (Object)

    the current value of date



11
12
13
# File 'lib/worked/reader.rb', line 11

def date
  @date
end

#hoursObject

Returns the value of attribute hours

Returns:

  • (Object)

    the current value of hours



11
12
13
# File 'lib/worked/reader.rb', line 11

def hours
  @hours
end

Instance Method Details

#<=>(other) ⇒ Object



16
17
18
# File 'lib/worked/reader.rb', line 16

def <=> other
  self.date <=> other.date
end

#week_of_yearObject



12
13
14
# File 'lib/worked/reader.rb', line 12

def week_of_year
  date.week_of_year
end