Sha256: f41cab23bcae00c193b533fcb9878de085527839fbcd397d89e6998288a94e1b

Contents?: true

Size: 503 Bytes

Versions: 6

Compression:

Stored size: 503 Bytes

Contents

require_relative 'feature_value'
require_relative 'feature'

module Zenlish
  module Feature
    class FeatureStruct < FeatureValue
      def initialize(aStructDef)
        featrs = build_features(aStructDef)
        super(aStructDef, featrs)
      end

      private

      def build_features(aStructDef)
        feats = []
        aStructDef.struct.each_value do |feature_def|
          feats << Feature.new(feature_def)
        end

        feats
      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_struct.rb
zenlish-0.2.04 lib/zenlish/feature/feature_struct.rb
zenlish-0.2.03 lib/zenlish/feature/feature_struct.rb
zenlish-0.2.02 lib/zenlish/feature/feature_struct.rb
zenlish-0.2.01 lib/zenlish/feature/feature_struct.rb
zenlish-0.2.00 lib/zenlish/feature/feature_struct.rb