Class: Sfp::Visitor::PrettyStateGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/sfp/visitors.rb

Instance Method Summary collapse

Instance Method Details

#visit(name, value, parent) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/sfp/visitors.rb', line 51

def visit(name, value, parent)
  if name[0,1] == '_'
    parent.delete(name)
  elsif value.is_a?(Hash)
    if value.isnull
      parent[name] = nil
      return false
    else
      parent.delete(name) if value['_context'] == 'procedure' or
          value['_context'] == 'constraint'
    end
  end
  true
end