Class: PfrpgCore::ClassFeature
- Inherits:
-
Object
- Object
- PfrpgCore::ClassFeature
- Includes:
- PfrpgUtility::Affectable
- Defined in:
- lib/pfrpg_core/class_feature.rb
Instance Attribute Summary collapse
-
#ability_name ⇒ Object
readonly
Returns the value of attribute ability_name.
-
#armor_filter ⇒ Object
readonly
Returns the value of attribute armor_filter.
-
#attack_filter ⇒ Object
readonly
Returns the value of attribute attack_filter.
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#effects ⇒ Object
readonly
Returns the value of attribute effects.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#special ⇒ Object
readonly
Returns the value of attribute special.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(params) ⇒ ClassFeature
constructor
A new instance of ClassFeature.
Constructor Details
#initialize(params) ⇒ ClassFeature
Returns a new instance of ClassFeature.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pfrpg_core/class_feature.rb', line 9 def initialize(params) @name = params[:name] @description = params[:description] @effects = params[:effects] @type = params[:type] @category = params[:category] @special = params[:special] @attack_filter= params[:attack_filter] @armor_filter = params[:armor_filter] @ability_name = params[:ability_name] end |
Instance Attribute Details
#ability_name ⇒ Object (readonly)
Returns the value of attribute ability_name.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def ability_name @ability_name end |
#armor_filter ⇒ Object (readonly)
Returns the value of attribute armor_filter.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def armor_filter @armor_filter end |
#attack_filter ⇒ Object (readonly)
Returns the value of attribute attack_filter.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def attack_filter @attack_filter end |
#category ⇒ Object (readonly)
Returns the value of attribute category.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def category @category end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def description @description end |
#effects ⇒ Object (readonly)
Returns the value of attribute effects.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def effects @effects end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def name @name end |
#special ⇒ Object (readonly)
Returns the value of attribute special.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def special @special end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/pfrpg_core/class_feature.rb', line 5 def type @type end |
Instance Method Details
#as_json(options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/pfrpg_core/class_feature.rb', line 21 def as_json(={}) { name: @name, description: @description, type: @type, category: @category, name: @name } end |