Module: ActiveZuora::Base::ClassMethods

Defined in:
lib/active_zuora/base.rb

Instance Method Summary collapse

Instance Method Details

#connectionObject


60
61
62
# File 'lib/active_zuora/base.rb', line 60

def connection
  @connection || Base.connection
end

#nested_class_name(unnested_class_name) ⇒ Object


64
65
66
67
68
# File 'lib/active_zuora/base.rb', line 64

def nested_class_name(unnested_class_name)
  # This helper method will take a class name, and nest it inside
  # the same module/class as self.
  (name.split("::")[0..-2] << unnested_class_name).join("::")
end

#zuora_object_nameObject


56
57
58
# File 'lib/active_zuora/base.rb', line 56

def zuora_object_name
  @zuora_object_name ||= self.name.split("::").last
end