Class: SMQueue::AdapterConfiguration
Direct Known Subclasses
NullAdapter::Configuration, SpreadAdapter::Configuration, StdioLineAdapter::Configuration, StompAdapter::Configuration
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ AdapterConfiguration
constructor
A new instance of AdapterConfiguration.
-
#to_hash ⇒ Object
need to use custom to_yaml because YAML won’t serialize classes.
- #to_yaml(*opts) ⇒ Object
Constructor Details
#initialize(*args, &block) ⇒ AdapterConfiguration
Returns a new instance of AdapterConfiguration.
116 117 118 119 |
# File 'lib/smqueue.rb', line 116 def initialize(*args, &block) #p [self.class, :initialize, args, caller] super end |
Instance Method Details
#to_hash ⇒ Object
need to use custom to_yaml because YAML won’t serialize classes
110 111 112 |
# File 'lib/smqueue.rb', line 110 def to_hash doodle.attributes.inject({}) {|hash, (name, attribute)| hash[name] = send(name); hash} end |
#to_yaml(*opts) ⇒ Object
113 114 115 |
# File 'lib/smqueue.rb', line 113 def to_yaml(*opts) to_hash.to_yaml(*opts) end |