class PtabModel

Public Class Methods

new(data) click to toggle source
# File lib/ptab.rb, line 87
def initialize(data)
    inflector = Dry::Inflector.new
    data.each {|key, value| 
        underscore_key = inflector.underscore(key)
        instance_variable_set("@#{underscore_key}", value)
        self.class.send(:attr_reader, underscore_key) # Dynamically create an accessor
    }
end
objects() click to toggle source
# File lib/ptab.rb, line 96
def self.objects
    @objects
end