class HelloWorldPlugin
A sample plugin to say “hello world” at every opportunity
Public Class Methods
new()
click to toggle source
# File lib/architect/plugin/hello_world.rb, line 6 def initialize @name = 'hello_world' end
Public Instance Methods
check()
click to toggle source
Check to see if any actions need to be taken, and return a list of Architect::ChangeRequest objects for each proposed action
# File lib/architect/plugin/hello_world.rb, line 19 def check say 'hello_world: checking' [] end
configure(config_hash)
click to toggle source
# File lib/architect/plugin/hello_world.rb, line 10 def configure(config_hash) @config = OpenStruct.new({ hello: 'world', quiet: false }.merge(config_hash)) @quiet = @config[:quiet] say 'hello_world: configured' end
design()
click to toggle source
Ask questions during the design of a new plan; i.e. when architect –design is called.
# File lib/architect/plugin/hello_world.rb, line 26 def design say 'hello_world: designing' end
execute()
click to toggle source
Execute the proposed actions based on the current plan.
# File lib/architect/plugin/hello_world.rb, line 36 def execute say 'hello_world: executing' end
plan(yaml)
click to toggle source
Parse a YAML plan file and perform validation.
# File lib/architect/plugin/hello_world.rb, line 31 def plan(yaml) say 'hello_world: planning' end
Private Instance Methods
say(message)
click to toggle source
Print a message to the screen
# File lib/architect/plugin/hello_world.rb, line 43 def say(message) puts message unless @quiet end