Class: Ruleby::Core::Rule

Inherits:
Object
  • Object
show all
Defined in:
lib/core/engine.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, pattern = nil, action = nil, priority = 0) ⇒ Rule

Returns a new instance of Rule.



87
88
89
90
91
92
# File 'lib/core/engine.rb', line 87

def initialize(name, pattern=nil, action=nil, priority=0) 
  @name = name
  @pattern = pattern
  @action = action  
  @priority = priority    
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



85
86
87
# File 'lib/core/engine.rb', line 85

def action
  @action
end

#nameObject (readonly)

Returns the value of attribute name.



85
86
87
# File 'lib/core/engine.rb', line 85

def name
  @name
end

#patternObject

Returns the value of attribute pattern.



84
85
86
# File 'lib/core/engine.rb', line 84

def pattern
  @pattern
end

#priorityObject

Returns the value of attribute priority.



85
86
87
# File 'lib/core/engine.rb', line 85

def priority
  @priority
end