Module: OptStruct::InstanceMethods
- Defined in:
- lib/opt_struct/instance_methods.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #defaults ⇒ Object
- #fetch(*a, &b) ⇒ Object
- #initialize(*arguments, **options) ⇒ Object
Instance Method Details
#==(other) ⇒ Object
20 21 22 |
# File 'lib/opt_struct/instance_methods.rb', line 20 def ==(other) == other. end |
#defaults ⇒ Object
16 17 18 |
# File 'lib/opt_struct/instance_methods.rb', line 16 def defaults self.class.defaults end |
#fetch(*a, &b) ⇒ Object
12 13 14 |
# File 'lib/opt_struct/instance_methods.rb', line 12 def fetch(*a, &b) .fetch(*a, &b) end |
#initialize(*arguments, **options) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/opt_struct/instance_methods.rb', line 3 def initialize(*arguments, **) with_init_callbacks do @options = assign_arguments(arguments) assign_defaults check_required_keys end end |