Class: Azure::ServiceBus::RuleAspect
- Inherits:
-
Object
- Object
- Azure::ServiceBus::RuleAspect
- Defined in:
- lib/azure/service_bus/rule_aspect.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ RuleAspect
constructor
A new instance of RuleAspect.
- #to_hash(hash = {}) ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ RuleAspect
Returns a new instance of RuleAspect.
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 |