Class: Calorie::Config
- Inherits:
-
Object
- Object
- Calorie::Config
- Defined in:
- lib/calorie.rb
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #week_starts_on(day = nil) ⇒ Object
- #week_starts_on?(day) ⇒ Boolean
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
16 17 18 |
# File 'lib/calorie.rb', line 16 def initialize week_starts_on :sunday end |
Instance Method Details
#week_starts_on(day = nil) ⇒ Object
20 21 22 23 |
# File 'lib/calorie.rb', line 20 def week_starts_on(day = nil) @week_starts_on = day if day @week_starts_on end |
#week_starts_on?(day) ⇒ Boolean
25 26 27 |
# File 'lib/calorie.rb', line 25 def week_starts_on?(day) day == @week_starts_on end |