Class: ConfigInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/otp_kickoff.rb

Overview

Helper class to get informations from configuration file (~/.otp_kickoff)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfigInfo

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.expand_path(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_emailObject

Returns the value of attribute author_email.



143
144
145
# File 'lib/otp_kickoff.rb', line 143

def author_email
  @author_email
end

#author_nameObject

Returns the value of attribute author_name.



143
144
145
# File 'lib/otp_kickoff.rb', line 143

def author_name
  @author_name
end