Class: Chimp::Executable

Inherits:
Object
  • Object
show all
Defined in:
lib/right_chimp/resources/executable.rb

Overview

This task contains parameters that describe a script/task to be executed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeExecutable

Returns a new instance of Executable.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/right_chimp/resources/executable.rb', line 11

def initialize
  @params = {
    'position' => 5,
    'right_script' => {
      'created_at' => '',
      'href' => 'dummy_href',
      'updated_at' => '',
      'version' => 4,
      'is_head_version' => false,
      'script' => '',
      'name' => 'dummy_name',
      'description' => 'dummy_description'
    },
    'recipe' => nil,
    'apply' => 'operational'
  }
  @delay = 0
end

Instance Attribute Details

#delayObject

Returns the value of attribute delay.



9
10
11
# File 'lib/right_chimp/resources/executable.rb', line 9

def delay
  @delay
end

#paramsObject

Returns the value of attribute params.



9
10
11
# File 'lib/right_chimp/resources/executable.rb', line 9

def params
  @params
end

Instance Method Details

#hrefObject



30
31
32
# File 'lib/right_chimp/resources/executable.rb', line 30

def href
  @params['right_script']['href']
end

#nameObject



34
35
36
# File 'lib/right_chimp/resources/executable.rb', line 34

def name
  @params['right_script']['name']
end