Class: Xray::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/xray/config.rb

Constant Summary collapse

CONFIG_FILE =
".xrayconfig"
DEFAULT_EDITOR =
'/usr/local/bin/subl'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#editorObject

Returns the value of attribute editor.



8
9
10
# File 'lib/xray/config.rb', line 8

def editor
  @editor
end

Instance Method Details

#config_fileObject



30
31
32
33
34
35
36
# File 'lib/xray/config.rb', line 30

def config_file
  if File.exists?("#{Dir.pwd}/#{CONFIG_FILE}")
    "#{Dir.pwd}/#{CONFIG_FILE}"
  else
    "#{Dir.home}/#{CONFIG_FILE}"
  end
end

#to_yamlObject



26
27
28
# File 'lib/xray/config.rb', line 26

def to_yaml
  {editor: editor}.to_yaml
end