Module: ModalSupport::BracketConstructor::ClassMethods
- Defined in:
- lib/modalsupport/mixins/bracket_constructor.rb
Instance Method Summary collapse
Instance Method Details
#[](*args) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/modalsupport/mixins/bracket_constructor.rb', line 9 def [](*args) if args.size==1 arg = args.first return nil if arg.nil? return arg if arg.kind_of?(self) end self.new(*args) end |