lib/rest_doc_rails/model_documentation.rb
# any method placed here will apply to classes, like Hickwall
# def acts_as_something
#   send :include, InstanceMethods
# end
any method placed here will apply to classes, like Hickwall
def acts_as_something
send :include, InstanceMethods
end
any method placed here will apply to classes like Hickwall def acts_as_something send : include InstanceMethods end
def model_attribute_documentation
        result = {}
        if self.respond_to? :columns_hash
          result = self.columns_hash.transform_values do |value|
            {
                type: value.type
            }
          end.with_indifferent_access
        elsif self.respond_to? :fields
          result = self.fields.transform_values do |value|
            {
                type: value.type
            }
          end.with_indifferent_access
        end
        result
      end
def model_attribute_documentation result = { } if self . respond_to? :columns_hash result = self . columns_hash . transform_values do | value | { type : value . type } end . with_indifferent_access elsif self . respond_to? :fields result = self . fields . transform_values do | value | { type : value . type } end . with_indifferent_access end result end
any method placed here will apply to classes, like Hickwall
def acts_as_something
send :include, InstanceMethods
end
any method placed here will apply to classes like Hickwall def acts_as_something send : include InstanceMethods end