Class: Astrails::Safe::Stream
- Inherits:
-
Object
- Object
- Astrails::Safe::Stream
- Defined in:
- lib/astrails/safe/stream.rb
Instance Attribute Summary collapse
-
#backup ⇒ Object
Returns the value of attribute backup.
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#expand(path) ⇒ Object
FIXME: move to Backup.
-
#initialize(config, backup) ⇒ Stream
constructor
A new instance of Stream.
Constructor Details
#initialize(config, backup) ⇒ Stream
Returns a new instance of Stream.
6 7 8 |
# File 'lib/astrails/safe/stream.rb', line 6 def initialize(config, backup) @config, @backup = config, backup end |
Instance Attribute Details
#backup ⇒ Object
Returns the value of attribute backup.
5 6 7 |
# File 'lib/astrails/safe/stream.rb', line 5 def backup @backup end |
#config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/astrails/safe/stream.rb', line 5 def config @config end |
Instance Method Details
#expand(path) ⇒ Object
FIXME: move to Backup
11 12 13 14 15 16 |
# File 'lib/astrails/safe/stream.rb', line 11 def (path) path . gsub(/:kind\b/, @backup.kind.to_s) . gsub(/:id\b/, @backup.id.to_s) . gsub(/:timestamp\b/, @backup.) end |