Class: Pfm::Generator::Context
- Inherits:
-
Object
- Object
- Pfm::Generator::Context
- Defined in:
- lib/iapi-idlc-sdk-pfm/generator.rb
Overview
This is here to hold attr_accessor data for Generator context variables
Class Method Summary collapse
Class Method Details
.add_attr(name) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/iapi-idlc-sdk-pfm/generator.rb', line 5 def self.add_attr(name) @attributes ||= [] unless @attributes.include?(name) @attributes << name attr_accessor(name) end end |
.reset ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/iapi-idlc-sdk-pfm/generator.rb', line 14 def self.reset return if @attributes.nil? @attributes.each do |attr| remove_method(attr) end @attributes = nil end |