module HardwareInformation::PurchasedHardware
Constants
- COLOUR_PURCHASED_AT_THIS_DATE
#¶ ↑
COLOUR_PURCHASED_AT_THIS_DATE
¶ ↑#¶ ↑
- LINUX_YAML
#¶ ↑
LINUX_YAML
¶ ↑A hardcoded path.
#¶ ↑
- MAIN_DIV
#¶ ↑
MAIN_DIV
¶ ↑CSS-related Constants are defined next.
#¶ ↑
Public Class Methods
add_bought_at(i)
click to toggle source
add_to_the_total_cost(i)
click to toggle source
body_css_class()
click to toggle source
body_css_style()
click to toggle source
bought_at?()
click to toggle source
file_computer_hardware?()
click to toggle source
#¶ ↑
HardwareInformation::PurchasedHardware.file_computer_hardware?
¶ ↑
All the important data is stored in the following .yml file:
bl /home/x/DATA/PC/OS/LINUX/yaml/computer_hardware.yml
#¶ ↑
# File lib/hardware_information/misc/purchased_hardware/purchased_hardware.rb, line 101 def self.file_computer_hardware? '/home/x/data/personal/yaml/my_hardware/my_hardware.yml' end
file_my_hardware()
click to toggle source
#¶ ↑
HardwareInformation::PurchasedHardware.file_my_hardware
¶ ↑
See:
bl /home/x/data/personal/yaml/my_hardware/my_hardware.yml
#¶ ↑
# File lib/hardware_information/misc/purchased_hardware/purchased_hardware.rb, line 113 def self.file_my_hardware "/home/x/data/personal/yaml/my_hardware/my_hardware.yml" end
linux_yaml_directory?()
click to toggle source
my_hardware(i = file_my_hardware)
click to toggle source
#¶ ↑
HardwareInformation::PurchasedHardware.my_hardware
¶ ↑
This method will return the hash I use for the hardware I have purchased over the years.
#¶ ↑
# File lib/hardware_information/misc/purchased_hardware/purchased_hardware.rb, line 123 def self.my_hardware(i = file_my_hardware) YAML.load_file(i) end
return_dataset_from_the_file_computer_hardware()
click to toggle source
#¶ ↑
HardwareInformation::PurchasedHardware.return_dataset_from_the_file_computer_hardware
¶ ↑
This will return the dataset stored in the .yml file.
#¶ ↑
# File lib/hardware_information/misc/purchased_hardware/purchased_hardware.rb, line 139 def self.return_dataset_from_the_file_computer_hardware _ = file_computer_hardware? if File.exist? _ return YAML.load_file(_) end end
title?()
click to toggle source