Sha256: 19863b74c8f94d725041055428f3bc2947e4a0cc7da67503f019e98e07b53e6c

Contents?: true

Size: 665 Bytes

Versions: 3

Compression:

Stored size: 665 Bytes

Contents

# Define the methods that can be called by a context to 
# define relationships
module Phenomenal::ContextRelationships
  def requires(context,*contexts)
    contexts = contexts.push(context)
    contexts.each do |target|
      self.parent_feature.requirements_for(self,{:on=>target})
    end
  end
  
  def implies(context,*contexts)
    contexts = contexts.push(context)
    contexts.each do |target|
      self.parent_feature.implications_for(self,{:on=>target})
    end
  end
  
  def suggests(context,*contexts)
    contexts = contexts.push(context)
    contexts.each do |target|
      self.parent_feature.suggestions_for(self,{:on=>target})
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phenomenal-1.1.0 lib/phenomenal/relationships/context_relationships.rb
phenomenal-1.0.1 lib/phenomenal/relationships/context_relationships.rb
phenomenal-1.0.0 lib/phenomenal/relationships/context_relationships.rb