Class: LOCat::Command

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Command

Returns a new instance of Command.



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/locat/command.rb', line 45

def initialize(options)
  @files        = nil
  @output       = nil
  @format       = 'highchart'
  @config       = default_config_files
  @title        = nil

  options.each do |k,v|
    send("#{k}=", v)
  end
end

Instance Attribute Details

#configObject

List of configuration files.



64
65
66
# File 'lib/locat/command.rb', line 64

def config
  @config
end

#filesObject

Files to include in analysis.



58
59
60
# File 'lib/locat/command.rb', line 58

def files
  @files
end

#formatObject

The output format (json, yaml, highchart).



61
62
63
# File 'lib/locat/command.rb', line 61

def format
  @format
end

#outputObject

Output file.



70
71
72
# File 'lib/locat/command.rb', line 70

def output
  @output
end

#titleObject

List of configuration files.



67
68
69
# File 'lib/locat/command.rb', line 67

def title
  @title
end

Instance Method Details

#runObject



78
79
80
# File 'lib/locat/command.rb', line 78

def run
  save
end