Class: Nutrella::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/nutrella/command.rb

Overview

This is the top-level class for the gem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration_directory, board_name) ⇒ Command

Returns a new instance of Command.



10
11
12
13
14
# File 'lib/nutrella/command.rb', line 10

def initialize(configuration_directory, board_name)
  @board_name = board_name
  @cache_filename = File.join(configuration_directory, ".nutrella.cache.yml")
  @configuration_filename = File.join(configuration_directory, ".nutrella.yml")
end

Instance Attribute Details

#cache_filenameObject (readonly)

Returns the value of attribute cache_filename.



8
9
10
# File 'lib/nutrella/command.rb', line 8

def cache_filename
  @cache_filename
end

#configuration_filenameObject (readonly)

Returns the value of attribute configuration_filename.



8
9
10
# File 'lib/nutrella/command.rb', line 8

def configuration_filename
  @configuration_filename
end

Instance Method Details

#runObject



16
17
18
19
20
# File 'lib/nutrella/command.rb', line 16

def run
  launch(board_url)
ensure
  logger.close
end