Method: PgGraph::Reflection.load_yaml
- Defined in:
- lib/pg_graph/reflector.rb
.load_yaml(hash) ⇒ Object
hash has the keys :match, :this, :that, and :pluralize. The keys can also be strings
95 96 97 98 99 100 |
# File 'lib/pg_graph/reflector.rb', line 95 def self.load_yaml(hash) Reflection.new *METHODS.map { |key| value = hash[key].nil? ? hash[key.to_s] : hash[key] value == "nil" ? nil : value } end |