Class: Feedcellar::Gtk::Command

Inherits:
Thor
  • Object
show all
Defined in:
lib/feedcellar/gtk/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Command

Returns a new instance of Command.



29
30
31
32
33
34
# File 'lib/feedcellar/gtk/command.rb', line 29

def initialize(*args)
  super
  default_base_dir = File.join(File.expand_path("~"), ".feedcellar")
  @base_dir = ENV["FEEDCELLAR_HOME"] || default_base_dir
  @database_dir = File.join(@base_dir, "db")
end

Instance Attribute Details

#database_dirObject (readonly)

Returns the value of attribute database_dir.



27
28
29
# File 'lib/feedcellar/gtk/command.rb', line 27

def database_dir
  @database_dir
end

Instance Method Details

#showObject



43
44
45
46
# File 'lib/feedcellar/gtk/command.rb', line 43

def show
  window = Window.new(@database_dir, options)
  window.run
end

#versionObject



37
38
39
# File 'lib/feedcellar/gtk/command.rb', line 37

def version
  puts VERSION
end