Class: Est::Estimate
- Inherits:
-
Object
- Object
- Est::Estimate
- Defined in:
- lib/est/estimate.rb
Overview
Estimate.
Defined Under Namespace
Classes: Const
Instance Method Summary collapse
-
#author ⇒ Object
Get author.
-
#date ⇒ Object
Get date.
-
#initialize(file) ⇒ Estimate
constructor
Ctor.
-
#total ⇒ Object
Get total estimate.
Constructor Details
#initialize(file) ⇒ Estimate
Ctor.
file
-
File with YAML estimate
38 39 40 41 |
# File 'lib/est/estimate.rb', line 38 def initialize(file) @yaml = YAML.load_file(file) fail "failed to read file #{file}" unless @yaml end |
Instance Method Details
#author ⇒ Object
Get author.
49 50 51 |
# File 'lib/est/estimate.rb', line 49 def @yaml['author'] end |
#date ⇒ Object
Get date.
44 45 46 |
# File 'lib/est/estimate.rb', line 44 def date Date.strptime(@yaml['date'], '%d-%m-%Y') end |