Class: Xray::Config
- Inherits:
-
Object
- Object
- Xray::Config
- Defined in:
- lib/xray/config.rb
Constant Summary collapse
- CONFIG_FILE =
".xrayconfig"- DEFAULT_EDITOR =
'/usr/local/bin/subl'
Instance Attribute Summary collapse
-
#editor ⇒ Object
Returns the value of attribute editor.
Instance Method Summary collapse
Instance Attribute Details
#editor ⇒ Object
Returns the value of attribute editor.
8 9 10 |
# File 'lib/xray/config.rb', line 8 def editor @editor end |
Instance Method Details
#config_file ⇒ Object
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_yaml ⇒ Object
26 27 28 |
# File 'lib/xray/config.rb', line 26 def to_yaml {editor: editor}.to_yaml end |