Sha256: cbbcb490498839f17d05139b11e71a69f02e2024afe572989d94a15021f85c52

Contents?: true

Size: 600 Bytes

Versions: 2

Compression:

Stored size: 600 Bytes

Contents

module Vedeu
  class Interface
    attr_accessor :id, :attributes, :active, :geometry, :name

    class << self
      def create(attributes = {})
        new(attributes).create
      end
    end

    def initialize(attributes = {})
      @attributes = attributes || {}

      @active     = false
      @geometry   = attributes[:geometry]
      @name       = attributes[:name]
    end

    def create
      InterfaceRepository.create(self)

      InterfaceRepository.activate(self.name)

      self
    end

    def initial_state; end

    def geometry
      Geometry.new(@geometry)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.0.14 lib/vedeu/repository/interface.rb
vedeu-0.0.13 lib/vedeu/repository/interface.rb