Class: Autotype::Configuration
- Inherits:
-
Object
- Object
- Autotype::Configuration
- Defined in:
- lib/autotype/profile.rb
Instance Attribute Summary collapse
-
#config_path ⇒ Object
Returns the value of attribute config_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #load_profile ⇒ Object
- #reload_profile! ⇒ Object
- #skipped_files ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 |
# File 'lib/autotype/profile.rb', line 26 def initialize @config_path = ENV["AUTOTYPE_CONFIG"] end |
Instance Attribute Details
#config_path ⇒ Object
Returns the value of attribute config_path.
24 25 26 |
# File 'lib/autotype/profile.rb', line 24 def config_path @config_path end |
Instance Method Details
#load_profile ⇒ Object
34 35 36 37 38 39 |
# File 'lib/autotype/profile.rb', line 34 def load_profile return @profile if defined?(@profile) && @profile path = config_path || DiscoveryProfile.find @profile = path ? DiscoveryProfile.load_overrides(path) : DiscoveryProfile.new end |
#reload_profile! ⇒ Object
41 42 43 44 |
# File 'lib/autotype/profile.rb', line 41 def reload_profile! remove_instance_variable(:@profile) if defined?(@profile) load_profile end |
#skipped_files ⇒ Object
30 31 32 |
# File 'lib/autotype/profile.rb', line 30 def skipped_files load_profile.skipped_files end |