Class: Himari::Rule

Inherits:
Struct
  • Object
show all
Defined in:
lib/himari/rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



2
3
4
# File 'lib/himari/rule.rb', line 2

def block
  @block
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/himari/rule.rb', line 2

def name
  @name
end

Instance Method Details

#call(context, decision) ⇒ Object



3
4
5
# File 'lib/himari/rule.rb', line 3

def call(context, decision)
  block.call(context, decision)
end