Class: Azure::ServiceBus::RuleAspect

Inherits:
Object
  • Object
show all
Defined in:
lib/azure/service_bus/rule_aspect.rb

Direct Known Subclasses

Action, Filter

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ RuleAspect

Returns a new instance of RuleAspect.

Yields:

  • (_self)

Yield Parameters:



18
19
20
# File 'lib/azure/service_bus/rule_aspect.rb', line 18

def initialize()
  yield self if block_given?
end

Class Method Details

.from_hash(hash) ⇒ Object



27
28
29
30
31
# File 'lib/azure/service_bus/rule_aspect.rb', line 27

def self.from_hash(hash)
  hash = {} unless hash
  type = hash[:type]
  Azure::ServiceBus.const_get(type).new(hash) if type
end

Instance Method Details

#to_hash(hash = {}) ⇒ Object



22
23
24
25
# File 'lib/azure/service_bus/rule_aspect.rb', line 22

def to_hash(hash={})
  hash[:type]=self.class.name.split('::').last
  hash
end