Class: Vinber::CurrentVinbers
- Inherits:
-
Object
- Object
- Vinber::CurrentVinbers
- Defined in:
- lib/vinber/current_vinbers.rb
Instance Attribute Summary collapse
-
#vinbers ⇒ Object
readonly
Returns the value of attribute vinbers.
Instance Method Summary collapse
-
#initialize(vinbers = {}) ⇒ CurrentVinbers
constructor
A new instance of CurrentVinbers.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(vinbers = {}) ⇒ CurrentVinbers
Returns a new instance of CurrentVinbers.
6 7 8 |
# File 'lib/vinber/current_vinbers.rb', line 6 def initialize(vinbers = {}) @vinbers = vinbers.with_indifferent_access end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/vinber/current_vinbers.rb', line 10 def method_missing(name, *args) if vinbers.has_key? name vinbers[name] else super end end |
Instance Attribute Details
#vinbers ⇒ Object (readonly)
Returns the value of attribute vinbers.
4 5 6 |
# File 'lib/vinber/current_vinbers.rb', line 4 def vinbers @vinbers end |