Module: Hashme::ClassMethods
- Defined in:
- lib/hashme.rb
Instance Method Summary collapse
-
#build(*attrs) {|instance| ... } ⇒ Object
Little help.
Instance Method Details
#build(*attrs) {|instance| ... } ⇒ Object
Little help. Equivalent to new.tap
40 41 42 43 44 |
# File 'lib/hashme.rb', line 40 def build(*attrs) instance = self.new(*attrs) yield instance if block_given? instance end |