Class: NibblerJSON

Inherits:
Object
  • Object
show all
Defined in:
lib/rakumarket/models.rb

Direct Known Subclasses

Rakumarket::Base

Class Method Summary collapse

Class Method Details

.inspect_attributesObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/rakumarket/models.rb', line 4

def self.inspect_attributes
  attributes = {}
  @rules.each do |k,v|
    attributes[k] = if v[1].respond_to?(:inspect_attributes)
      v[2] ? [v[1].inspect_attributes] : v[1].inspect_attributes
    else
      v[1].respond_to?(:values) ? v[1].values.values.join("|") : ""
    end
  end
  attributes
end