Module: OptStruct::InstanceMethods

Defined in:
lib/opt_struct/instance_methods.rb

Instance Method Summary collapse

Instance Method Details

#fetch(*a, &b) ⇒ Object



10
11
12
# File 'lib/opt_struct/instance_methods.rb', line 10

def fetch(*a, &b)
  options.fetch(*a, &b)
end

#initialize(*arguments, **options) ⇒ Object



3
4
5
6
7
8
# File 'lib/opt_struct/instance_methods.rb', line 3

def initialize(*arguments, **options)
  @arguments = arguments
  @options = self.class.defaults.merge(options)
  check_required_args
  check_required_keys
end