Sha256: 2733064bc4235dba2bf599b9edbb7afd2ceb8f46c35d19ff3ca894bcf811e730

Contents?: true

Size: 835 Bytes

Versions: 4

Compression:

Stored size: 835 Bytes

Contents

# Define the DSL methods for relationships
module Phenomenal::DSL
  def self.define_relationships(klass)
    klass.class_eval do
      # Requirements
      def phen_requirements_for(source,targets)
        Phenomenal::Manager.instance.default_feature.requirements_for(source,targets)
      end
      Phenomenal::DSL.phen_alias(:requirements_for,klass)
      
       # Implications
      def phen_implications_for(source,targets)
        Phenomenal::Manager.instance.default_feature.implications_for(source,targets)
      end
      Phenomenal::DSL.phen_alias(:implications_for,klass)
      
       # Suggestions
      def phen_suggestions_for(source,targets)
        Phenomenal::Manager.instance.default_feature.suggestions_for(source,targets)
      end
      Phenomenal::DSL.phen_alias(:suggestions_for,klass)
      
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phenomenal-1.2.4 lib/phenomenal/relationship/dsl.rb
phenomenal-1.2.3 lib/phenomenal/relationship/dsl.rb
phenomenal-1.2.2 lib/phenomenal/relationship/dsl.rb
phenomenal-1.2.1 lib/phenomenal/relationship/dsl.rb