Sha256: f3f4ee71c8de7292510976c39d5cb9eb359ca8755e0e7a62a5c66b44c93f06dc

Contents?: true

Size: 586 Bytes

Versions: 6

Compression:

Stored size: 586 Bytes

Contents

# -*- encoding : utf-8 -*-
module RademadeAdmin
  class MenuService
    class MenuItem

      attr_accessor :model_info, :children_items

      def name
        @model_info.item_name
      end

      def count
        @model_info.menu_count
      end

      def model
        @model_info.model
      end

      def has_sub_items?
        sub_items.size > 0
      end

      def sub_items
        @children_items
      end

      private

      def initialize(model_info, children_items = [])
        @model_info, @children_items = model_info, children_items
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rademade_admin-0.2.2 app/services/menu_service/menu_item.rb
rademade_admin-0.2.1 app/services/menu_service/menu_item.rb
rademade_admin-0.2.0 app/services/menu_service/menu_item.rb
rademade_admin-0.1.6 app/services/menu_service/menu_item.rb
rademade_admin-0.1.5 app/services/menu_service/menu_item.rb
rademade_admin-0.1.4 app/services/menu_service/menu_item.rb