Class: PoolParty::Resources::CallFunction

Inherits:
Resource show all
Defined in:
lib/poolparty/pool/custom_resource.rb

Overview

Resources for function call

Instance Method Summary collapse

Methods inherited from Resource

#absent, available_resource_methods, available_resources, #class_type_name, custom_function, #custom_function, custom_functions, custom_functions_to_string, #disallowed_options, #ensures, #get_modified_options, #ifnot, inherited, #is_absent, #is_present, #key, #loaded, #present, #requires, #template, #virtual_resource?

Methods included from PoolParty::Resources

add_has_and_does_not_have_methods_for, #add_resource, #call_function, #classpackage_with_self, #custom_file, custom_function, #custom_function, #gem, #get_resource, #reset_resources!, #resource, #resources, #resources_string, #resources_string_from_resources

Methods included from Configurable

included

Methods included from CloudResourcer

#full_keypair_path, #instances, #keypair_path, #keypair_paths, #new_keypair_path, #number_of_resources, #parent, #possible_keypair_basenames, #set_parent

Constructor Details

#initialize(str = "", opts = {}, &block) ⇒ CallFunction

Returns a new instance of CallFunction.



23
24
25
26
# File 'lib/poolparty/pool/custom_resource.rb', line 23

def initialize(str="", opts={}, &block)
  @str = str
  super(opts, &block)
end

Instance Method Details

#to_string(prev = "") ⇒ Object



27
28
29
30
31
# File 'lib/poolparty/pool/custom_resource.rb', line 27

def to_string(prev="")
  returning Array.new do |arr|
    arr << "#{prev}#{@str}"
  end.join("\n")
end