Sha256: 7d959cadb624f4a0df6da4120b5fe832aa7dd0a0e56d2b5b4a70c4f41f146901

Contents?: true

Size: 641 Bytes

Versions: 6

Compression:

Stored size: 641 Bytes

Contents

require 'forwardable'

module Zenlish
  module Feature
    class Feature
      # Forwardable mix-in module to implement delegation of specified methods.
      extend Forwardable
      
      # The feature definition
      attr_reader :definition
      
      attr_reader :binding

      def_delegators :@definition, :name, :domain
      
      # @param aDefinition [FeatureDef]
      def initialize(aDefinition)
        @definition = aDefinition
      end
      
      def bound?
        not binding.nil?
      end
      
      def bind_to(aFeatureValue)
        @binding = aFeatureValue
      end
    end # class
  end # module
end # module

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
zenlish-0.2.05 lib/zenlish/feature/feature.rb
zenlish-0.2.04 lib/zenlish/feature/feature.rb
zenlish-0.2.03 lib/zenlish/feature/feature.rb
zenlish-0.2.02 lib/zenlish/feature/feature.rb
zenlish-0.2.01 lib/zenlish/feature/feature.rb
zenlish-0.2.00 lib/zenlish/feature/feature.rb