Class: AutoConsul::Cluster::Registry::S3Provider::S3Member
- Inherits:
-
Object
- Object
- AutoConsul::Cluster::Registry::S3Provider::S3Member
- Defined in:
- lib/auto-consul/providers/s3.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#s3_object ⇒ Object
readonly
Returns the value of attribute s3_object.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(s3obj) ⇒ S3Member
constructor
A new instance of S3Member.
Constructor Details
#initialize(s3obj) ⇒ S3Member
Returns a new instance of S3Member.
9 10 11 12 13 |
# File 'lib/auto-consul/providers/s3.rb', line 9 def initialize s3obj @s3_object = s3obj @time, @identifier = S3Provider.from_key_base(File.basename(s3obj.key)) @data_read = false end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
7 8 9 |
# File 'lib/auto-consul/providers/s3.rb', line 7 def identifier @identifier end |
#s3_object ⇒ Object (readonly)
Returns the value of attribute s3_object.
7 8 9 |
# File 'lib/auto-consul/providers/s3.rb', line 7 def s3_object @s3_object end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
7 8 9 |
# File 'lib/auto-consul/providers/s3.rb', line 7 def time @time end |
Instance Method Details
#data ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/auto-consul/providers/s3.rb', line 15 def data if not @data_read @data = s3_object.read @data_read = true end @data end |