Class: Gemi::Conf
- Inherits:
-
Object
- Object
- Gemi::Conf
- Defined in:
- lib/gemi/conf.rb
Defined Under Namespace
Classes: GemircError
Instance Attribute Summary collapse
-
#rubys ⇒ Object
readonly
Returns the value of attribute rubys.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(yaml_path) ⇒ Conf
constructor
A new instance of Conf.
Constructor Details
#initialize(yaml_path) ⇒ Conf
Returns a new instance of Conf.
20 21 22 23 24 25 26 27 |
# File 'lib/gemi/conf.rb', line 20 def initialize(yaml_path) if yaml_path yaml = YAML.load_file(yaml_path) @rubys = parse_rubys(yaml["rubys"]) else @rubys = [Ruby::Default] end end |
Instance Attribute Details
#rubys ⇒ Object (readonly)
Returns the value of attribute rubys.
28 29 30 |
# File 'lib/gemi/conf.rb', line 28 def rubys @rubys end |
Class Method Details
.create ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/gemi/conf.rb', line 12 def self.create unless File.exist?(GEMIRC) here = File.dirname(__FILE__) template_path = File.("../../gemirc.yml", here) FileUtils.cp(template_path, GEMIRC) end end |