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.



97
98
99
100
101
102
# File 'lib/core/engine.rb', line 97

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.



95
96
97
# File 'lib/core/engine.rb', line 95

def action
  @action
end

#nameObject (readonly)

Returns the value of attribute name.



95
96
97
# File 'lib/core/engine.rb', line 95

def name
  @name
end

#patternObject

Returns the value of attribute pattern.



94
95
96
# File 'lib/core/engine.rb', line 94

def pattern
  @pattern
end

#priorityObject

Returns the value of attribute priority.



95
96
97
# File 'lib/core/engine.rb', line 95

def priority
  @priority
end