Class: Scripref::Passage

Inherits:
Struct
  • Object
show all
Defined in:
lib/scripref/passage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#a1 ⇒ Object

Returns the value of attribute a1

Returns:

  • (Object) —

    the current value of a1



6
7
8
# File 'lib/scripref/passage.rb', line 6

def a1
  @a1
end

#a2 ⇒ Object

Returns the value of attribute a2

Returns:

  • (Object) —

    the current value of a2



6
7
8
# File 'lib/scripref/passage.rb', line 6

def a2
  @a2
end

#b1 ⇒ Object

Returns the value of attribute b1

Returns:

  • (Object) —

    the current value of b1



6
7
8
# File 'lib/scripref/passage.rb', line 6

def b1
  @b1
end

#b2 ⇒ Object

Returns the value of attribute b2

Returns:

  • (Object) —

    the current value of b2



6
7
8
# File 'lib/scripref/passage.rb', line 6

def b2
  @b2
end

#c1 ⇒ Object

Returns the value of attribute c1

Returns:

  • (Object) —

    the current value of c1



6
7
8
# File 'lib/scripref/passage.rb', line 6

def c1
  @c1
end

#c2 ⇒ Object

Returns the value of attribute c2

Returns:

  • (Object) —

    the current value of c2



6
7
8
# File 'lib/scripref/passage.rb', line 6

def c2
  @c2
end

#text ⇒ Object Also known as: to_s

Returns the value of attribute text

Returns:

  • (Object) —

    the current value of text



6
7
8
# File 'lib/scripref/passage.rb', line 6

def text
  @text
end

#v1 ⇒ Object

Returns the value of attribute v1

Returns:

  • (Object) —

    the current value of v1



6
7
8
# File 'lib/scripref/passage.rb', line 6

def v1
  @v1
end

#v2 ⇒ Object

Returns the value of attribute v2

Returns:

  • (Object) —

    the current value of v2



6
7
8
# File 'lib/scripref/passage.rb', line 6

def v2
  @v2
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
# File 'lib/scripref/passage.rb', line 12

def == other
  return false unless other.kind_of? Passage
  to_a == other.to_a
end

#to_a ⇒ Object



8
9
10
# File 'lib/scripref/passage.rb', line 8

def to_a
  [b1, c1, v1, a1, b2, c2, v2, a2]
end