Class: Zenlish::Inflect::FeatureHeading

Inherits:
Heading
  • Object
show all
Defined in:
lib/zenlish/inflect/feature_heading.rb

Instance Attribute Summary

Attributes inherited from Heading

#label

Instance Method Summary collapse

Methods inherited from Heading

#initialize

Constructor Details

This class inherits a constructor from Zenlish::Inflect::Heading

Instance Method Details

#all_matches(aFeatureBearer) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/zenlish/inflect/feature_heading.rb', line 12

def all_matches(aFeatureBearer)
  feat = aFeatureBearer[label]
  if feat.kind_of?(Feature::FeatureDef)
    feat.domain.to_a
  else
    [feat]
  end
end

#evaluate_for(aFeatureBearer) ⇒ Object



8
9
10
# File 'lib/zenlish/inflect/feature_heading.rb', line 8

def evaluate_for(aFeatureBearer)
  aFeatureBearer[label]
end