Class: SafariBookmarksParser::Commands::BaseCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/safari_bookmarks_parser/commands/base_command.rb

Direct Known Subclasses

DumpCommand, DupsCommand, EmptyCommand

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ BaseCommand

Returns a new instance of BaseCommand.



12
13
14
15
16
17
18
19
# File 'lib/safari_bookmarks_parser/commands/base_command.rb', line 12

def initialize(argv)
  @plist_path = File.expand_path('~/Library/Safari/Bookmarks.plist')
  @output_path = nil
  @output_format = :json

  parse_options(argv)
  handle_argv(argv)
end

Instance Attribute Details

#output_formatObject (readonly)

Returns the value of attribute output_format.



10
11
12
# File 'lib/safari_bookmarks_parser/commands/base_command.rb', line 10

def output_format
  @output_format
end

#output_pathObject (readonly)

Returns the value of attribute output_path.



10
11
12
# File 'lib/safari_bookmarks_parser/commands/base_command.rb', line 10

def output_path
  @output_path
end

#plist_pathObject (readonly)

Returns the value of attribute plist_path.



10
11
12
# File 'lib/safari_bookmarks_parser/commands/base_command.rb', line 10

def plist_path
  @plist_path
end