Class: StreetFighter::Either

Inherits:
Object
  • Object
show all
Defined in:
lib/street_fighter/either.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left_value, right_value) ⇒ Either

Returns a new instance of Either.



5
6
7
8
# File 'lib/street_fighter/either.rb', line 5

def initialize left_value, right_value
  @left  = Left.new(left_value)
  @right = Right.new(right_value)
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



3
4
5
# File 'lib/street_fighter/either.rb', line 3

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



3
4
5
# File 'lib/street_fighter/either.rb', line 3

def right
  @right
end