Method: AzureResourceProbe#initialize
- Defined in:
- lib/resources/azure/azure_backend.rb
#initialize(item) ⇒ Object
Initialize method for the class. Accepts an item, be it a scalar value, hash or Azure object It will then create the necessary dynamic methods so that they can be called in the tests This is accomplished by call the AzureResourceDynamicMethods
342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/resources/azure/azure_backend.rb', line 342 def initialize(item) dm = AzureResourceDynamicMethods.new dm.create_methods(self, item) # Set the item as a property on the class # This is so that it is possible to interrogate what has been added to the class and isolate them from # the standard methods that a Ruby class has. # This used for checking Tags on a resource for example # It also allows direct access if so required @item = item # Set how many items have been set @count = item.length end |