Class: StatModule::Fix

Inherits:
JSONable show all
Defined in:
lib/fix.rb

Constant Summary

Constants inherited from JSONable

JSONable::FORMATTING_BALL, JSONable::FORMATTING_CHECKMARK, JSONable::FORMATTING_STAR, JSONable::FORMATTING_WARNING

Instance Method Summary collapse

Methods inherited from JSONable

from_json!, #to_json

Constructor Details

#initialize(location, hash = nil) ⇒ Fix

Initialize new Fix object

Params:

location

StatModule::Location, required

hash

Hash, can be null



12
13
14
15
16
17
18
# File 'lib/fix.rb', line 12

def initialize(location, hash = nil)
  if hash.is_a? Hash
    super(hash)
    return
  end
  @location = location
end

Instance Method Details

#locationObject

Get location



32
33
34
# File 'lib/fix.rb', line 32

def location
  @location
end

#location=(location) ⇒ Object

Set location

Params:

location

StatModule::Location

Raises:



25
26
27
28
# File 'lib/fix.rb', line 25

def location=(location)
  raise TypeException unless location.is_a?(StatModule::Location)
  @location = location
end

#new_textObject

Get new text



48
49
50
# File 'lib/fix.rb', line 48

def new_text
  @newText
end

#new_text=(new_text) ⇒ Object

Set new text

Params:

new_text

String

Raises:



41
42
43
44
# File 'lib/fix.rb', line 41

def new_text=(new_text)
  raise TypeException unless new_text.is_a?(String)
  @newText = new_text
end