Class: ConfigInfo
- Inherits:
-
Object
- Object
- ConfigInfo
- Defined in:
- lib/otp_kickoff.rb
Overview
Helper class to get informations from configuration file (~/.otp_kickoff)
Instance Attribute Summary collapse
-
#author_email ⇒ Object
Returns the value of attribute author_email.
-
#author_name ⇒ Object
Returns the value of attribute author_name.
Instance Method Summary collapse
-
#initialize ⇒ ConfigInfo
constructor
A new instance of ConfigInfo.
Constructor Details
#initialize ⇒ ConfigInfo
Returns a new instance of ConfigInfo.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/otp_kickoff.rb', line 145 def initialize begin info = YAML.load_file(File.(CONFIGURATION_FILE)) rescue puts "I'm sorry but the configuration file doesn't exists." puts "Please run the command below:" puts " otp_kickoff configure --author=YOUR_NAME --email=YOUR_EMAIL" exit 0 end @author_name = info["author_name"] @author_email = info["author_email"] end |
Instance Attribute Details
#author_email ⇒ Object
Returns the value of attribute author_email.
143 144 145 |
# File 'lib/otp_kickoff.rb', line 143 def @author_email end |
#author_name ⇒ Object
Returns the value of attribute author_name.
143 144 145 |
# File 'lib/otp_kickoff.rb', line 143 def @author_name end |