Class: Script::Layers::Domain::PushPackage

Inherits:
Object
  • Object
show all
Defined in:
lib/project_types/script/layers/domain/push_package.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, script, script_content, compiled_type) ⇒ PushPackage

Returns a new instance of PushPackage.



9
10
11
12
13
14
# File 'lib/project_types/script/layers/domain/push_package.rb', line 9

def initialize(id, script, script_content, compiled_type)
  @id = id
  @script = script
  @script_content = script_content
  @compiled_type = compiled_type
end

Instance Attribute Details

#compiled_typeObject (readonly)

Returns the value of attribute compiled_type.



7
8
9
# File 'lib/project_types/script/layers/domain/push_package.rb', line 7

def compiled_type
  @compiled_type
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/project_types/script/layers/domain/push_package.rb', line 7

def id
  @id
end

#scriptObject (readonly)

Returns the value of attribute script.



7
8
9
# File 'lib/project_types/script/layers/domain/push_package.rb', line 7

def script
  @script
end

#script_contentObject (readonly)

Returns the value of attribute script_content.



7
8
9
# File 'lib/project_types/script/layers/domain/push_package.rb', line 7

def script_content
  @script_content
end

Instance Method Details

#push(script_service, api_key, force) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/project_types/script/layers/domain/push_package.rb', line 16

def push(script_service, api_key, force)
  script_service.push(
    extension_point_type: @script.extension_point_type,
    script_name: @script.name,
    script_content: @script_content,
    compiled_type: @compiled_type,
    api_key: api_key,
    force: force
  )
end