Class: GamePlay::Options::Helper

Inherits:
Object
  • Object
show all
Defined in:
docs/4_Systems_105_Options.rb

Overview

Option helper allowing to work with a specific option (get next value, set it etc...)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Helper

Create a new option

Parameters:

  • args (Array) —

    options arguments



280
281
# File 'docs/4_Systems_105_Options.rb', line 280

def initialize(*args)
end

Instance Attribute Details

#description ⇒ String

Option description

Returns:



271
272
273
# File 'docs/4_Systems_105_Options.rb', line 271

def description
  @description
end

#getter ⇒ Symbol (readonly)

Option getter (on $options)

Returns:

  • (Symbol)


274
275
276
# File 'docs/4_Systems_105_Options.rb', line 274

def getter
  @getter
end

#name ⇒ String

Option name

Returns:



268
269
270
# File 'docs/4_Systems_105_Options.rb', line 268

def name
  @name
end

#setter ⇒ Symbol (readonly)

Option setter (on $options)

Returns:

  • (Symbol)


277
278
279
# File 'docs/4_Systems_105_Options.rb', line 277

def setter
  @setter
end

#type ⇒ Symbol (readonly)

Option type

Returns:

  • (Symbol)


259
260
261
# File 'docs/4_Systems_105_Options.rb', line 259

def type
  @type
end

#values ⇒ Array (readonly)

Option values

Returns:

  • (Array)


262
263
264
# File 'docs/4_Systems_105_Options.rb', line 262

def values
  @values
end

#values_text ⇒ Array<String>, String

Option value text(s)

Returns:



265
266
267
# File 'docs/4_Systems_105_Options.rb', line 265

def values_text
  @values_text
end

Instance Method Details

#current_value ⇒ Object

Retreive the current value

Returns:



284
285
# File 'docs/4_Systems_105_Options.rb', line 284

def current_value
end

#next_value ⇒ Object

Retreive the next value

Returns:



288
289
# File 'docs/4_Systems_105_Options.rb', line 288

def next_value
end

#prev_value ⇒ Object

Retreive the prev value

Returns:



292
293
# File 'docs/4_Systems_105_Options.rb', line 292

def prev_value
end

#update_value(new_value)

Update the option value

Parameters:



296
297
# File 'docs/4_Systems_105_Options.rb', line 296

def update_value(new_value)
end