Class: IRC::Store
- Inherits:
-
Object
- Object
- IRC::Store
- Defined in:
- lib/irc/store.rb
Class Attribute Summary collapse
-
.options ⇒ Object
Returns the value of attribute options.
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Store
constructor
A new instance of Store.
- #method_missing(method_name, *args, &block) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Store
Returns a new instance of Store.
8 9 10 11 |
# File 'lib/irc/store.rb', line 8 def initialize = {} = {:host => 'localhost', :port => 6379}.merge() @store = Redis.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
13 14 15 |
# File 'lib/irc/store.rb', line 13 def method_missing method_name, *args, &block store.send method_name, *args, &block end |
Class Attribute Details
.options ⇒ Object
Returns the value of attribute options.
18 19 20 |
# File 'lib/irc/store.rb', line 18 def @options end |
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
6 7 8 |
# File 'lib/irc/store.rb', line 6 def store @store end |
Class Method Details
.store ⇒ Object
19 20 21 |
# File 'lib/irc/store.rb', line 19 def store self.new end |