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.
162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/otp_kickoff.rb', line 162 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.
160 161 162 |
# File 'lib/otp_kickoff.rb', line 160 def @author_email end |
#author_name ⇒ Object
Returns the value of attribute author_name.
160 161 162 |
# File 'lib/otp_kickoff.rb', line 160 def @author_name end |