Class: PfrpgReaders::MiscReader::PrettyFeat
- Inherits:
-
Object
- Object
- PfrpgReaders::MiscReader::PrettyFeat
- Defined in:
- lib/pfrpg_readers/misc_reader.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#special ⇒ Object
readonly
Returns the value of attribute special.
Instance Method Summary collapse
-
#initialize(char_feat) ⇒ PrettyFeat
constructor
A new instance of PrettyFeat.
Constructor Details
#initialize(char_feat) ⇒ PrettyFeat
Returns a new instance of PrettyFeat.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/pfrpg_readers/misc_reader.rb', line 113 def initialize(char_feat) if char_feat.respond_to? 'pathfinder_feat' feat = NullObject.maybe(char_feat.pathfinder_feat) else feat = NullObject.maybe(char_feat.feat) end @name = feat.name || "Feat" if (@name == 'Custom Feat') @description = char_feat.feat_special else @description = feat.benefit @special = char_feat.feat_special end end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
112 113 114 |
# File 'lib/pfrpg_readers/misc_reader.rb', line 112 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
112 113 114 |
# File 'lib/pfrpg_readers/misc_reader.rb', line 112 def name @name end |
#special ⇒ Object (readonly)
Returns the value of attribute special.
112 113 114 |
# File 'lib/pfrpg_readers/misc_reader.rb', line 112 def special @special end |