Class: Appydave::Tools::Configuration::Models::YoutubeAutomationConfig::WorkflowStep

Inherits:
Object
  • Object
show all
Defined in:
lib/appydave/tools/configuration/models/youtube_automation_config.rb

Overview

Model for workflow steps

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ WorkflowStep

Returns a new instance of WorkflowStep.



79
80
81
82
83
84
# File 'lib/appydave/tools/configuration/models/youtube_automation_config.rb', line 79

def initialize(data)
  @group = data['group']
  @sequence = data['sequence']
  @name = data['name']
  @description = data['description']
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



77
78
79
# File 'lib/appydave/tools/configuration/models/youtube_automation_config.rb', line 77

def description
  @description
end

#groupObject

Returns the value of attribute group.



77
78
79
# File 'lib/appydave/tools/configuration/models/youtube_automation_config.rb', line 77

def group
  @group
end

#nameObject

Returns the value of attribute name.



77
78
79
# File 'lib/appydave/tools/configuration/models/youtube_automation_config.rb', line 77

def name
  @name
end

#sequenceObject

Returns the value of attribute sequence.



77
78
79
# File 'lib/appydave/tools/configuration/models/youtube_automation_config.rb', line 77

def sequence
  @sequence
end

Instance Method Details

#filename(ext) ⇒ Object



86
87
88
# File 'lib/appydave/tools/configuration/models/youtube_automation_config.rb', line 86

def filename(ext)
  "#{@group}-#{@sequence}-#{@name}.#{ext}"
end

#to_hObject



90
91
92
93
94
95
96
97
# File 'lib/appydave/tools/configuration/models/youtube_automation_config.rb', line 90

def to_h
  {
    'group' => @group,
    'sequence' => @sequence,
    'name' => @name,
    'description' => @description
  }
end