Class: AnythingHub::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/anything-hub/config.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(action, *args) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/anything-hub/config.rb', line 5

def method_missing(action, *args)
  if args.first
    instance_variable_set("@#{action.to_s}", args.first)
  else
    instance_variable_get("@#{action.to_s}")
  end
end