Class: WebTranslateIt::Safe::Stream
- Inherits:
-
Object
- Object
- WebTranslateIt::Safe::Stream
- Defined in:
- lib/web_translate_it/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.
9 10 11 12 |
# File 'lib/web_translate_it/safe/stream.rb', line 9 def initialize(config, backup) @config = config @backup = backup end |
Instance Attribute Details
#backup ⇒ Object
Returns the value of attribute backup.
7 8 9 |
# File 'lib/web_translate_it/safe/stream.rb', line 7 def backup @backup end |
#config ⇒ Object
Returns the value of attribute config.
7 8 9 |
# File 'lib/web_translate_it/safe/stream.rb', line 7 def config @config end |
Instance Method Details
#expand(path) ⇒ Object
FIXME: move to Backup
15 16 17 18 19 20 |
# File 'lib/web_translate_it/safe/stream.rb', line 15 def (path) path .gsub(/:kind\b/, @backup.kind.to_s) .gsub(/:id\b/, @backup.id.to_s) .gsub(/:timestamp\b/, @backup.) end |