Class: CommandLine
- Inherits:
-
Object
- Object
- CommandLine
- Defined in:
- lib/file_sentry/command_line.rb
Instance Attribute Summary collapse
-
#encryption ⇒ Object
Returns the value of attribute encryption.
-
#filepath ⇒ Object
Returns the value of attribute filepath.
-
#op_file ⇒ Object
Returns the value of attribute op_file.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ CommandLine
constructor
A new instance of CommandLine.
- #start_utility ⇒ Object
Constructor Details
#initialize(attributes) ⇒ CommandLine
Returns a new instance of CommandLine.
4 5 6 7 |
# File 'lib/file_sentry/command_line.rb', line 4 def initialize(attributes) attributes.each {|attribute, value| self.send("#{attribute}=", value) } self.op_file = OPFile.new({filepath: filepath}) end |
Instance Attribute Details
#encryption ⇒ Object
Returns the value of attribute encryption.
2 3 4 |
# File 'lib/file_sentry/command_line.rb', line 2 def encryption @encryption end |
#filepath ⇒ Object
Returns the value of attribute filepath.
2 3 4 |
# File 'lib/file_sentry/command_line.rb', line 2 def filepath @filepath end |
#op_file ⇒ Object
Returns the value of attribute op_file.
2 3 4 |
# File 'lib/file_sentry/command_line.rb', line 2 def op_file @op_file end |
Instance Method Details
#start_utility ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/file_sentry/command_line.rb', line 9 def start_utility key = load_api_key config_app(key) op_file.filepath = filepath if filepath analyze_file else show_usage show_config end end |