Class: GamesAndRpgParadise::Sarlamar::DsaHero

Inherits:
Base
  • Object
show all
Defined in:
lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb

Overview

RpgParadise::Sarlamar::DsaHero

Constant Summary collapse

NAMESPACE =
#

NAMESPACE

#
inspect

Constants included from Base::Extensions::Colours

Base::Extensions::Colours::ARRAY_AVAILABLE_KONSOLE_COLOURS

Constants included from CommonExtensions

CommonExtensions::CONTROL_C_CODE, CommonExtensions::N

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Base::Extensions::Colours

ecomment, #efancy, #eparse, #forestgreen, #gold, #grey, #lightblue, #mediumseagreen, #mediumslateblue, #peru, #rev, sdir, sfancy, #sfile, simp, #teal, #yellow

Methods included from Base::Extensions::CommandlineArguments

#commandline_arguments?, #filter_away_commandline_arguments, #first_argument?, #first_non_hyphened_argument?, #set_commandline_arguments

Methods included from CommonExtensions

#cat, #cd, #cliner, #copy_file, #delete, #dirname_but_retains_the_trailing_slash, #disable_colours, #ensure_that_the_log_directory_exists, #esystem, #get_user_input, #infer_the_namespace, #is_on_roebe?, #log_dir?, #mkdir, #mkdir_then_cd_into_it, #mv, #namespace?, #opne, #opnn, #project_base_directory?, #project_image_directory?, #project_yaml_directory?, #rds, #register_sigint, #remove_this_directory, #rename_file, #reset_the_internal_hash, #return_pwd, #return_today, #touch_file, #wrap, #write_what_into

Constructor Details

#initialize(which_type = :dsa4) ⇒ DsaHero

#

initialize

#


34
35
36
37
38
39
40
41
# File 'lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb', line 34

def initialize(
    which_type = :dsa4
  )
  which_type = :dsa4 if which_type == nil
  char_gen = CharGenerator.new(which_type.to_sym)
  @char = char_gen.generate_char
  @name = 'Zordan'
end

Instance Attribute Details

#ageObject (readonly)

Returns the value of attribute age.



24
25
26
# File 'lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb', line 24

def age
  @age
end

#charObject (readonly)

Returns the value of attribute char.



22
23
24
# File 'lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb', line 22

def char
  @char
end

#nameObject (readonly)

Returns the value of attribute name.



23
24
25
# File 'lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb', line 23

def name
  @name
end

Class Method Details

.[](i = ARGV) ⇒ Object

#

GamesAndRpgParadise::Sarlamar::DsaHero[]

#


70
71
72
# File 'lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb', line 70

def self.[](i = ARGV)
  new(i)
end

Instance Method Details

#debugObject

#

debug

#


46
47
48
49
50
# File 'lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb', line 46

def debug
  pp @char
  pp @name
  pp @age
end

#resetObject

#

reset (reset tag)

#


55
56
57
58
# File 'lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb', line 55

def reset
  super()
  @age = 22
end

#runObject

#

run (run tag)

#


64
65
# File 'lib/games_and_rpg_paradise/games/sarlamar/dsa_hero.rb', line 64

def run
end