class ManagerBundlesBase

Attributes

build_type[R]

Properties

Public Class Methods

new(build_type) click to toggle source

default constructor

Calls superclass method ManagerWithJsonData::new
# File lib/mrpin/core/bundles/manager_bundles_base.rb, line 39
def initialize(build_type)
  super

  @class_asset = BundleBase

  @build_type = build_type
end

Protected Instance Methods

data_client_folder() click to toggle source
# File lib/mrpin/core/bundles/manager_bundles_base.rb, line 11
def data_client_folder
  "#{Constants::DIR_ASSETS_DYNAMIC}/data_client/bundles/#{@build_type}/"
end
get_json_data_client() click to toggle source
# File lib/mrpin/core/bundles/manager_bundles_base.rb, line 16
def get_json_data_client
  result = {}

  bundles_map = {}

  bundles_list = get_bundles_list

  bundles_list.each do |bundle_info|
    bundles_map[bundle_info.name] = bundle_info.serialize
  end

  result[:bundles_map] = bundles_map

  result.to_json
end

Private Instance Methods

get_bundles_list() click to toggle source
# File lib/mrpin/core/bundles/manager_bundles_base.rb, line 48
def get_bundles_list
  result = @class_asset.where(build_type: @build_type).to_a

  result.map!(&:create_info)

  result
end