Sha256: 0f59cf058733415bea0039afd44de34ceae8f93bfdf0e9355b4f9c8d2377a06d

Contents?: true

Size: 631 Bytes

Versions: 15

Compression:

Stored size: 631 Bytes

Contents

module DataMapper
  module TypesFixtures

    class NetworkNode
      #
      # Behaviors
      #

      include ::DataMapper::Resource

      #
      # Properties
      #

      property :id,               Serial
      property :ip_address,       IPAddress
      property :cidr_subnet_bits, Integer
      property :node_uuid,        UUID

      #
      # API
      #

      alias_method :uuid,  :node_uuid
      alias_method :uuid=, :node_uuid=

      def runs_ipv6?
        self.ip_address.ipv6?
      end

      def runs_ipv4?
        self.ip_address.ipv4?
      end
    end # NetworkNode
  end # TypesFixtures
end # DataMapper

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
sbf-dm-types-1.4.0 spec/fixtures/network_node.rb
sbf-dm-types-1.3.0 spec/fixtures/network_node.rb
sbf-dm-types-1.3.0.beta spec/fixtures/network_node.rb
ardm-types-1.2.3 spec/fixtures/network_node.rb
ardm-types-1.2.2 spec/fixtures/network_node.rb
dm-types-1.2.2 spec/fixtures/network_node.rb
dm-types-1.2.1 spec/fixtures/network_node.rb
dm-types-1.2.0 spec/fixtures/network_node.rb
dm-types-1.2.0.rc2 spec/fixtures/network_node.rb
dm-types-1.2.0.rc1 spec/fixtures/network_node.rb
dm-types-1.1.0 spec/fixtures/network_node.rb
dm-types-1.1.0.rc3 spec/fixtures/network_node.rb
dm-types-1.1.0.rc2 spec/fixtures/network_node.rb
dm-types-1.1.0.rc1 spec/fixtures/network_node.rb
dm-types-1.0.2 spec/fixtures/network_node.rb