Class: PfrpgReaders::MiscReader::PrettyFeat

Inherits:
Object
  • Object
show all
Defined in:
lib/pfrpg_readers/misc_reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject (readonly)

Returns the value of attribute description.



112
113
114
# File 'lib/pfrpg_readers/misc_reader.rb', line 112

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



112
113
114
# File 'lib/pfrpg_readers/misc_reader.rb', line 112

def name
  @name
end

#specialObject (readonly)

Returns the value of attribute special.



112
113
114
# File 'lib/pfrpg_readers/misc_reader.rb', line 112

def special
  @special
end