Sha256: d042e2e84e4caf67779f38e8a0bed5c88c7dd1925c5d1a1f43eb0b05def1a634

Contents?: true

Size: 402 Bytes

Versions: 14

Compression:

Stored size: 402 Bytes

Contents

# frozen_string_literal: true

module Sail
  module Types
    # Type
    #
    # This is the base class all types
    # inherit from. It is an abstract class
    # not supposed to be instantiated.
    class Type
      def initialize(setting)
        @setting = setting
      end

      def to_value
        @setting.value.to_s
      end

      def from(value)
        value
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sail-3.6.1 lib/sail/types/type.rb
sail-3.6.0 lib/sail/types/type.rb
sail-3.5.1 lib/sail/types/type.rb
sail-3.5.0 lib/sail/types/type.rb
sail-3.4.0 lib/sail/types/type.rb
sail-3.3.0 lib/sail/types/type.rb
sail-3.2.4 lib/sail/types/type.rb
sail-3.2.3 lib/sail/types/type.rb
sail-3.2.2 lib/sail/types/type.rb
sail-3.2.1 lib/sail/types/type.rb
sail-3.2.0 lib/sail/types/type.rb
sail-3.1.0 lib/sail/types/type.rb
sail-3.0.1 lib/sail/types/type.rb
sail-3.0.0 lib/sail/types/type.rb