Sha256: 688840adb45a50c4bedb11d071e4e107c0c034ac1bb91dbdb150c53bf8410bf1

Contents?: true

Size: 760 Bytes

Versions: 11

Compression:

Stored size: 760 Bytes

Contents

require 'active_record'
require 'rflow/configuration/uuid_keyed'

class RFlow
  class Configuration
    class Component < ConfigurationItem
      include UUIDKeyed
      include ActiveModel::Validations

      serialize :options, Hash

      belongs_to :shard, :primary_key => 'uuid', :foreign_key => 'shard_uuid'
      has_many :input_ports,  :primary_key => 'uuid', :foreign_key => 'component_uuid'
      has_many :output_ports, :primary_key => 'uuid', :foreign_key => 'component_uuid'

      #TODO: Get this to work
      #has_many :input_connections, :through => :input_ports, :source => :input_connections
      #has_many :output_connections, :through => :output_ports, :source => :output_connection

      validates_uniqueness_of :name
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rflow-1.3.0 lib/rflow/configuration/component.rb
rflow-1.3.0a1 lib/rflow/configuration/component.rb
rflow-1.2.0 lib/rflow/configuration/component.rb
rflow-1.1.0 lib/rflow/configuration/component.rb
rflow-1.0.1 lib/rflow/configuration/component.rb
rflow-1.0.0 lib/rflow/configuration/component.rb
rflow-1.0.0a6 lib/rflow/configuration/component.rb
rflow-1.0.0a5 lib/rflow/configuration/component.rb
rflow-1.0.0a4 lib/rflow/configuration/component.rb
rflow-1.0.0a3 lib/rflow/configuration/component.rb
rflow-1.0.0a2 lib/rflow/configuration/component.rb