Sha256: ae0697bc7ea42db42873af2a3dee89bfd7091af62a736e88c852dd58caa42c2d
Contents?: true
Size: 1.14 KB
Versions: 11
Compression:
Stored size: 1.14 KB
Contents
module HybridPlatformsConductor module HpcPlugins module PlatformHandler class ServerlessChef < HybridPlatformsConductor::PlatformHandler # Small class that can get a Ruby DSL file and return all DSL calls that have been made to it class DslParser # List of calls made by parsing the source file # Array attr_reader :calls # Constructor # # Parameters:: # * *calls* (Array): List of calls to complement [default = []] def initialize(calls = []) @calls = calls end # Parse a file and get all its DSL calls # # Parameters:: # * *source* (String): File to parse def parse(source) instance_eval(File.read(source)) end def method_missing(method_name, *args, &block) sub_calls = [] @calls << { method: method_name, args: args, block: block, calls_on_result: sub_calls } DslParser.new(sub_calls) end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems