lib/rflow/configuration/port.rb in rflow-1.0.0a1 vs lib/rflow/configuration/port.rb in rflow-1.0.0a2
- old
+ new
@@ -1,28 +1,26 @@
require 'active_record'
require 'rflow/configuration/uuid_keyed'
class RFlow
class Configuration
- class Port < ConfigDB
+ class Port < ConfigurationItem
include UUIDKeyed
include ActiveModel::Validations
- class PortInvalid < StandardError; end
-
belongs_to :component, :primary_key => 'uuid', :foreign_key => 'component_uuid'
# TODO: Make some sort of component/port validation work here
#validate :component_has_defined_port
end
# STI-based classes
- class InputPort < Port;
+ class InputPort < Port
has_many :input_connections, :class_name => 'RFlow::Configuration::Connection', :primary_key => 'uuid', :foreign_key => 'input_port_uuid'
has_many :connections, :class_name => 'RFlow::Configuration::Connection', :primary_key => 'uuid', :foreign_key => 'input_port_uuid'
end
- class OutputPort < Port;
+ class OutputPort < Port
has_many :output_connections, :class_name => 'RFlow::Configuration::Connection', :primary_key => 'uuid', :foreign_key => 'output_port_uuid'
has_many :connections, :class_name => 'RFlow::Configuration::Connection', :primary_key => 'uuid', :foreign_key => 'output_port_uuid'
end
end
end