lib/oneaccess/data_object/representer/industry.rb in oneaccess-0.1.3 vs lib/oneaccess/data_object/representer/industry.rb in oneaccess-0.1.4

- old
+ new

@@ -1,15 +1,24 @@ # frozen_string_literal: true +require_relative "../industry" +# declare industry to avoid circular dependency +# rubocop:disable Style/ClassAndModuleChildren +class ONEAccess::DataObject::Industry; end +class ONEAccess::DataObject::Representer::Industry < Representable::Decorator; end +# rubocop:enable Style/ClassAndModuleChildren + module ONEAccess module DataObject module Representer class Industry < Representable::Decorator include Representable::JSON property :id, as: :Id, type: Integer property :name, as: :Name, type: String property :code, as: :Code, type: String + property :parent, as: :Parent, + decorator: Representer::Industry, class: DataObject::Industry end end end end