Class: DbBackups::Container

Inherits:
Object
  • Object
show all
Includes:
View
Defined in:
lib/db_backups/container.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from View

#to_s

Constructor Details

#initialize(app, environment, opts = {}) ⇒ Container

Returns a new instance of Container.



11
12
13
14
15
16
# File 'lib/db_backups/container.rb', line 11

def initialize(app, environment, opts={})
  puts "Connecting to container for app: #{app.inspect} in environment: #{environment.inspect} #{opts.inspect unless opts.empty?} ..."
  @app = app
  @environment = environment
  @opts = opts
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



9
10
11
# File 'lib/db_backups/container.rb', line 9

def app
  @app
end

#environmentObject (readonly)

Returns the value of attribute environment.



9
10
11
# File 'lib/db_backups/container.rb', line 9

def environment
  @environment
end

Instance Method Details

#[](index) ⇒ Object



18
19
20
# File 'lib/db_backups/container.rb', line 18

def [](index)
  files[index]
end