Class: Shared::Configuration

Inherits:
Resource show all
Defined in:
lib/vas/shared/configuration.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#location, #security

Instance Method Summary collapse

Instance Attribute Details

#pathObject (readonly)

The path of the configuration



23
24
25
# File 'lib/vas/shared/configuration.rb', line 23

def path
  @path
end

#sizeObject (readonly)

The size of the configuration



26
27
28
# File 'lib/vas/shared/configuration.rb', line 26

def size
  @size
end

Instance Method Details

#content(&block) ⇒ Object

Retrieves the configuration’s content and passes it to the block



45
46
47
# File 'lib/vas/shared/configuration.rb', line 45

def content(&block)
  client.get_stream(@content_location, &block)
end

#instanceObject

The instance that owns the configuration



50
51
52
# File 'lib/vas/shared/configuration.rb', line 50

def instance
  @instance_class.new(@instance_location, client)
end

#to_sObject

:nodoc:



54
55
56
# File 'lib/vas/shared/configuration.rb', line 54

def to_s #:nodoc:
  "#<#{self.class} name='#@path' size=#@size>"
end