Class: GitIndexCLI
- Inherits:
-
Object
- Object
- GitIndexCLI
- Defined in:
- lib/gitindexcli.rb
Instance Attribute Summary collapse
-
#directory ⇒ Object
readonly
Returns the value of attribute directory.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize ⇒ GitIndexCLI
constructor
A new instance of GitIndexCLI.
Constructor Details
#initialize ⇒ GitIndexCLI
Returns a new instance of GitIndexCLI.
3 4 5 |
# File 'lib/gitindexcli.rb', line 3 def initialize @filename = "" end |
Instance Attribute Details
#directory ⇒ Object (readonly)
Returns the value of attribute directory.
2 3 4 |
# File 'lib/gitindexcli.rb', line 2 def directory @directory end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
2 3 4 |
# File 'lib/gitindexcli.rb', line 2 def path @path end |
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gitindexcli.rb', line 7 def call if !mac_OS? puts "Sorry, this gem is only compatible with Mac OS" else greeting input = gets.chomp if input.downcase != "exit" directory_from_input(input) determine_path create_file `open #{@filename}` end end end |