Module: ODDB::Yaml

Includes:
OddbUri
Included in:
Model
Defined in:
lib/oddb/export/yaml.rb

Constant Summary

Constants included from OddbUri

OddbUri::YAML_URI

Class Method Summary collapse

Instance Method Summary collapse

Methods included from OddbUri

#to_yaml, #to_yaml_map, #to_yaml_type

Class Method Details

.append_features(mod) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/oddb/export/yaml.rb', line 36

def Yaml.append_features(mod)
  super
  mod.module_eval {
    class << self 
      def export(*args)
        define_method(:to_yaml_properties) {
          super.push(*args).uniq.reject { |name| 
            instance_variable_get(name).nil? }
        }
      end
    end
  }
end

Instance Method Details

#to_yaml_propertiesObject



33
34
35
# File 'lib/oddb/export/yaml.rb', line 33

def to_yaml_properties
  super - self.class.connections - self.class.connectors
end