Class: PfrpgCore::Demographics
- Inherits:
-
Object
- Object
- PfrpgCore::Demographics
- Defined in:
- lib/pfrpg_core/demographics.rb
Instance Attribute Summary collapse
-
#character_name ⇒ Object
readonly
Returns the value of attribute character_name.
-
#deity ⇒ Object
readonly
Returns the value of attribute deity.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#gender ⇒ Object
readonly
Returns the value of attribute gender.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#languages ⇒ Object
readonly
Returns the value of attribute languages.
-
#player_name ⇒ Object
readonly
Returns the value of attribute player_name.
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(params) ⇒ Demographics
constructor
A new instance of Demographics.
Constructor Details
#initialize(params) ⇒ Demographics
Returns a new instance of Demographics.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pfrpg_core/demographics.rb', line 6 def initialize(params) @player_name = params[:player_name] @character_name = params[:name] @deity = params[:deity] @gender = params[:gender] @weight = params[:weight] @height = params[:height] @description = params[:description] @languages = params[:languages] end |
Instance Attribute Details
#character_name ⇒ Object (readonly)
Returns the value of attribute character_name.
3 4 5 |
# File 'lib/pfrpg_core/demographics.rb', line 3 def character_name @character_name end |
#deity ⇒ Object (readonly)
Returns the value of attribute deity.
3 4 5 |
# File 'lib/pfrpg_core/demographics.rb', line 3 def deity @deity end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/pfrpg_core/demographics.rb', line 3 def description @description end |
#gender ⇒ Object (readonly)
Returns the value of attribute gender.
3 4 5 |
# File 'lib/pfrpg_core/demographics.rb', line 3 def gender @gender end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/pfrpg_core/demographics.rb', line 3 def height @height end |
#languages ⇒ Object (readonly)
Returns the value of attribute languages.
3 4 5 |
# File 'lib/pfrpg_core/demographics.rb', line 3 def languages @languages end |
#player_name ⇒ Object (readonly)
Returns the value of attribute player_name.
3 4 5 |
# File 'lib/pfrpg_core/demographics.rb', line 3 def player_name @player_name end |
#weight ⇒ Object (readonly)
Returns the value of attribute weight.
3 4 5 |
# File 'lib/pfrpg_core/demographics.rb', line 3 def weight @weight end |
Instance Method Details
#as_json(options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/pfrpg_core/demographics.rb', line 17 def as_json(={}) { :player_name => @player_name, :character_name => @character_name, :deity => @deity, :gender => @gender, :height => @height, :weight => @weight, :description => @description, :languages => @languages } end |