Class: Droppper::Config
- Inherits:
-
Object
- Object
- Droppper::Config
- Defined in:
- lib/droppper/config.rb
Constant Summary collapse
- DEFAULT =
{ token: nil, ssh: { user: "root", port: "22", keyfile: "~/.ssh/id_rsa" }, create: { region: "nyc3", image: "ubuntu-14-04-x64", size: "512mb", keys: [] } }
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#files ⇒ Object
Returns the value of attribute files.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #print ⇒ Object
- #ssh ⇒ Object
- #token ⇒ Object
- #token=(new_token) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
20 21 22 |
# File 'lib/droppper/config.rb', line 20 def initialize load_config end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/droppper/config.rb', line 3 def data @data end |
#files ⇒ Object
Returns the value of attribute files.
3 4 5 |
# File 'lib/droppper/config.rb', line 3 def files @files end |
Instance Method Details
#create ⇒ Object
40 41 42 |
# File 'lib/droppper/config.rb', line 40 def create data.create end |
#print ⇒ Object
24 25 26 |
# File 'lib/droppper/config.rb', line 24 def print puts Droppper::Utils.print_hash(data) end |
#ssh ⇒ Object
36 37 38 |
# File 'lib/droppper/config.rb', line 36 def ssh data.ssh end |
#token ⇒ Object
28 29 30 |
# File 'lib/droppper/config.rb', line 28 def token data.token end |
#token=(new_token) ⇒ Object
32 33 34 |
# File 'lib/droppper/config.rb', line 32 def token=(new_token) data.token = new_token end |