Class: Mj::AlternativeFile::Commands::ListCommand
- Inherits:
-
Object
- Object
- Mj::AlternativeFile::Commands::ListCommand
- Defined in:
- lib/mj/alternative_file/commands/list_command.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
- #debug? ⇒ Boolean
- #exists? ⇒ Boolean
-
#initialize(file, options) ⇒ ListCommand
constructor
A new instance of ListCommand.
- #types ⇒ Object
Constructor Details
#initialize(file, options) ⇒ ListCommand
Returns a new instance of ListCommand.
9 10 11 12 |
# File 'lib/mj/alternative_file/commands/list_command.rb', line 9 def initialize(file, ) @file = CurrentFile.new(file.to_s) @options = end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
7 8 9 |
# File 'lib/mj/alternative_file/commands/list_command.rb', line 7 def file @file end |
Instance Method Details
#debug? ⇒ Boolean
22 23 24 |
# File 'lib/mj/alternative_file/commands/list_command.rb', line 22 def debug? @options[:debug] end |
#exists? ⇒ Boolean
14 15 16 |
# File 'lib/mj/alternative_file/commands/list_command.rb', line 14 def exists? @options[:exists] end |
#types ⇒ Object
18 19 20 |
# File 'lib/mj/alternative_file/commands/list_command.rb', line 18 def types @options[:types].to_s.split(",") end |