Class: Xlogin::Settings

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/xlogin.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ Settings

Returns a new instance of Settings.



12
13
14
15
# File 'lib/xlogin.rb', line 12

def initialize(*args, &block)
  super(*args, &block)
  freeze
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



17
18
19
20
# File 'lib/xlogin.rb', line 17

def method_missing(name, *args, &block)
  return to_h.key($1.to_sym) if name.to_s =~ /^(\w+)\?$/
  super(name, *args, &block)
end