Class: CertDataVisualizer
- Inherits:
-
Object
- Object
- CertDataVisualizer
- Defined in:
- lib/cert_open_data_visualizer.rb
Instance Attribute Summary collapse
-
#formatter ⇒ Object
Returns the value of attribute formatter.
Instance Method Summary collapse
- #clean_cache! ⇒ Object
- #fetch! ⇒ Object
- #filter_by_city(*citys) ⇒ Object
- #first_format ⇒ Object
-
#initialize ⇒ CertDataVisualizer
constructor
A new instance of CertDataVisualizer.
- #print_first_format ⇒ Object
- #print_second_format ⇒ Object
- #second_format ⇒ Object
Constructor Details
#initialize ⇒ CertDataVisualizer
Returns a new instance of CertDataVisualizer.
9 10 11 |
# File 'lib/cert_open_data_visualizer.rb', line 9 def initialize @formatter = CertOpenDataVisualizer::Formatter.new end |
Instance Attribute Details
#formatter ⇒ Object
Returns the value of attribute formatter.
8 9 10 |
# File 'lib/cert_open_data_visualizer.rb', line 8 def formatter @formatter end |
Instance Method Details
#clean_cache! ⇒ Object
35 36 37 38 39 |
# File 'lib/cert_open_data_visualizer.rb', line 35 def clean_cache! puts "Cleaning cache!" CertOpenDataVisualizer::DummyCacher.new.clean! puts "Done!" end |
#fetch! ⇒ Object
41 42 43 |
# File 'lib/cert_open_data_visualizer.rb', line 41 def fetch! @formatter.data = CertOpenDataVisualizer::Visualize.new.parse.all_data end |
#filter_by_city(*citys) ⇒ Object
29 30 31 32 33 |
# File 'lib/cert_open_data_visualizer.rb', line 29 def filter_by_city(*citys) citys.each do |city| @formatter.filter_by_city(city) end end |
#first_format ⇒ Object
13 14 15 |
# File 'lib/cert_open_data_visualizer.rb', line 13 def first_format @formatter.first_format end |
#print_first_format ⇒ Object
17 18 19 |
# File 'lib/cert_open_data_visualizer.rb', line 17 def print_first_format puts first_format end |
#print_second_format ⇒ Object
25 26 27 |
# File 'lib/cert_open_data_visualizer.rb', line 25 def print_second_format puts second_format end |
#second_format ⇒ Object
21 22 23 |
# File 'lib/cert_open_data_visualizer.rb', line 21 def second_format @formatter.second_format end |