Class: EightBall::Conditions::Base
- Inherits:
-
Object
- Object
- EightBall::Conditions::Base
show all
- Defined in:
- lib/eight_ball/conditions/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(_options = []) ⇒ Base
Returns a new instance of Base.
7
8
9
|
# File 'lib/eight_ball/conditions/base.rb', line 7
def initialize(_options = [])
@parameter = nil
end
|
Instance Attribute Details
#parameter ⇒ Object
Returns the value of attribute parameter.
5
6
7
|
# File 'lib/eight_ball/conditions/base.rb', line 5
def parameter
@parameter
end
|
Instance Method Details
#==(other) ⇒ Object
Also known as:
eql?
15
16
17
|
# File 'lib/eight_ball/conditions/base.rb', line 15
def ==(other)
other.class == self.class && other.state == state
end
|
#hash ⇒ Object
20
21
22
|
# File 'lib/eight_ball/conditions/base.rb', line 20
def hash
state.hash
end
|
#satisfied? ⇒ Boolean
11
12
13
|
# File 'lib/eight_ball/conditions/base.rb', line 11
def satisfied?
raise 'You can never satisfy the Base condition'
end
|