Class: Moon::Formatter::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/moon/formatter/generic.rb

Overview

Outputs a hash with all instance variables of the given model.

Instance Method Summary collapse

Instance Method Details

#hash(model) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/moon/formatter/generic.rb', line 5

def hash(model)
  @model = model
  initialize_hash
  inject_instance_variables
  inject_id
  @hash
end