Class: Floccus::Cloud
- Inherits:
-
Object
- Object
- Floccus::Cloud
- Defined in:
- lib/floccus/cloud.rb
Constant Summary collapse
- CONFIG_PATH =
"#{ENV['HOME']}/.floccfg"
Instance Method Summary collapse
- #bucket ⇒ Object
- #domain ⇒ Object
-
#initialize ⇒ Cloud
constructor
A new instance of Cloud.
- #s3 ⇒ Object
- #use_domain? ⇒ Boolean
Constructor Details
#initialize ⇒ Cloud
Returns a new instance of Cloud.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/floccus/cloud.rb', line 6 def initialize config = YAML.load(File.read(CONFIG_PATH)) AWS.config( :access_key_id => config["access_key_id"], :secret_access_key => config["secret_access_key"] ) @default_bucket = config["default_bucket"] @domain = config["domain"] @s3 = AWS::S3.new end |
Instance Method Details
#bucket ⇒ Object
19 20 21 |
# File 'lib/floccus/cloud.rb', line 19 def bucket @default_bucket end |
#domain ⇒ Object
31 32 33 |
# File 'lib/floccus/cloud.rb', line 31 def domain @domain end |
#s3 ⇒ Object
23 24 25 |
# File 'lib/floccus/cloud.rb', line 23 def s3 @s3 end |
#use_domain? ⇒ Boolean
27 28 29 |
# File 'lib/floccus/cloud.rb', line 27 def use_domain? @domain end |