Class: Mode::Commands::AnalyzeSchema
- Inherits:
-
Object
- Object
- Mode::Commands::AnalyzeSchema
- Includes:
- Helpers
- Defined in:
- lib/mode/commands/analyze_schema.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(path, options = {}) ⇒ AnalyzeSchema
constructor
A new instance of AnalyzeSchema.
Methods included from Helpers
#config_dir, #config_exists?, #config_path, #configure_api_requests!, #connect_config_exists?, #require_config!, #require_connect_config!, #require_credentials!, #timer_block
Constructor Details
#initialize(path, options = {}) ⇒ AnalyzeSchema
Returns a new instance of AnalyzeSchema.
11 12 13 14 |
# File 'lib/mode/commands/analyze_schema.rb', line 11 def initialize(path, = {}) @path = path @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/mode/commands/analyze_schema.rb', line 9 def @options end |
#path ⇒ Object
Returns the value of attribute path.
8 9 10 |
# File 'lib/mode/commands/analyze_schema.rb', line 8 def path @path end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mode/commands/analyze_schema.rb', line 16 def execute if path.nil? || !File.exist?(path) puts "Error: Couldn't find file at #{path}" return end csv = build_csv analysis = build_analysis(csv) display_analysis(analysis) end |