Class: Tug::ConfigFile
- Inherits:
-
Object
- Object
- Tug::ConfigFile
- Defined in:
- lib/tug/config/config_file.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#keychain ⇒ Object
readonly
Returns the value of attribute keychain.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ ConfigFile
constructor
A new instance of ConfigFile.
Constructor Details
#initialize(path) ⇒ ConfigFile
Returns a new instance of ConfigFile.
32 33 34 35 36 |
# File 'lib/tug/config/config_file.rb', line 32 def initialize(path) config = YAML::load_file(path) @project = Tug::Project.new(config) @keychain = Tug::Keychain.keychain(config) end |
Instance Attribute Details
#keychain ⇒ Object (readonly)
Returns the value of attribute keychain.
5 6 7 |
# File 'lib/tug/config/config_file.rb', line 5 def keychain @keychain end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
4 5 6 |
# File 'lib/tug/config/config_file.rb', line 4 def project @project end |
Class Method Details
.config_file(options) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/tug/config/config_file.rb', line 9 def config_file() if .has_key?("export") Tug::IpaConfigFile.config_file() elsif .has_key?("keychain") Tug::KeychainConfigFile.config_file() elsif .has_key?("config") Tug::ConfigFile.config_file_from_path(["config"]) else Tug::MissingConfigFile.new end end |