Class: Serverspec::Type::RabbitmqVhostList
Instance Method Summary
collapse
#initialize, #length
Methods inherited from ApiBase
#[], #initialize
Instance Method Details
#has_vhost?(vhost) ⇒ Boolean
7
8
9
|
# File 'lib/serverspec_extra_types/types/rabbitmq_vhost_list.rb', line 7
def has_vhost?(vhost)
inspection.find { |str| str['name'] == vhost }
end
|
#inspection ⇒ Object
19
20
21
|
# File 'lib/serverspec_extra_types/types/rabbitmq_vhost_list.rb', line 19
def inspection
@inspection ||= ::MultiJson.load(get_inspection.stdout)
end
|
#to_s ⇒ Object
11
12
13
|
# File 'lib/serverspec_extra_types/types/rabbitmq_vhost_list.rb', line 11
def to_s
'RabbitMQ VHosts List'
end
|
#url ⇒ Object
15
16
17
|
# File 'lib/serverspec_extra_types/types/rabbitmq_vhost_list.rb', line 15
def url
"#{@url_base}/api/vhosts"
end
|