Class: SidedRule
Instance Attribute Summary collapse
-
#side ⇒ Object
Returns the value of attribute side.
Attributes inherited from Rule
Instance Method Summary collapse
-
#initialize(action, side) ⇒ SidedRule
constructor
A new instance of SidedRule.
- #to_json ⇒ Object
Methods inherited from Rule
Constructor Details
#initialize(action, side) ⇒ SidedRule
Returns a new instance of SidedRule.
59 60 61 62 |
# File 'lib/wonko_the_sane/rules.rb', line 59 def initialize(action, side) super(action) @side = side end |
Instance Attribute Details
#side ⇒ Object
Returns the value of attribute side.
57 58 59 |
# File 'lib/wonko_the_sane/rules.rb', line 57 def side @side end |
Instance Method Details
#to_json ⇒ Object
64 65 66 67 68 |
# File 'lib/wonko_the_sane/rules.rb', line 64 def to_json obj = super obj[:side] = @side return obj end |