Top Level Namespace
Defined Under Namespace
Classes: CV
Instance Method Summary collapse
Instance Method Details
#format_period(period) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/yaml-cv.rb', line 15 def format_period(period) month_names = { 1 => "Jun", 2 => "Feb", 3 => "Mar", 4 => "Apr", 5 => "May", 6 => "Jun", 7 => "Jul", 8 => "Aug", 9 => "Sep", 10 => "Oct", 11 => "Nov", 12 => "Dec" } if period["month"] index = period["month"] period["month_name"] = month_names[ index ] end period end |
#load_asset(asset_file) ⇒ Object
9 10 11 12 13 |
# File 'lib/yaml-cv.rb', line 9 def load_asset(asset_file) file_path = File.join(File.dirname(__FILE__), "assets") file_path = File.join(file_path, asset_file) File.read(file_path) end |