Class: Vinber::CurrentVinbers

Inherits:
Object
  • Object
show all
Defined in:
lib/vinber/current_vinbers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#vinbersObject (readonly)

Returns the value of attribute vinbers.



4
5
6
# File 'lib/vinber/current_vinbers.rb', line 4

def vinbers
  @vinbers
end