Class: Pear::Configuration
- Inherits:
-
Object
- Object
- Pear::Configuration
- Defined in:
- lib/pear/configuration.rb
Constant Summary collapse
- CONFIG_FILE =
'.pear.yml'
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
Instance Method Summary collapse
Instance Attribute Details
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
5 6 7 |
# File 'lib/pear/configuration.rb', line 5 def @authors end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
5 6 7 |
# File 'lib/pear/configuration.rb', line 5 def email @email end |
Instance Method Details
#write_sample_configuration ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/pear/configuration.rb', line 7 def write_sample_configuration abort('This doesn\'t look like a Git repository.') \ unless Dir.exists?('.git') abort('Whoa there! A configuration file is already present.') \ if File.exists?('.pear.yml') File.write(CONFIG_FILE, <<-config) email: [email protected] authors: - ad Alice Doe - bd Bob Doe config end |