Class: PostCheckoutHook

Inherits:
Hook
  • Object
show all
Defined in:
lib/dot_example/post_checkout_hook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Hook

#contains_steps?, #contents, #create_file, #create_file_if_does_not_exist, #filepath, #find_or_create, #print_new_hook_message, #print_new_steps_message, #write!

Constructor Details

#initialize(dot_env_dot_example = nil) ⇒ PostCheckoutHook

Returns a new instance of PostCheckoutHook.



2
3
4
5
6
# File 'lib/dot_example/post_checkout_hook.rb', line 2

def initialize(dot_env_dot_example = nil)
  @dot_env_dot_example = dot_env_dot_example || DotEnvDotExample.new
  @type = "post-checkout"
  create_file_if_does_not_exist
end

Instance Attribute Details

#dot_env_dot_exampleObject (readonly)

Returns the value of attribute dot_env_dot_example.



8
9
10
# File 'lib/dot_example/post_checkout_hook.rb', line 8

def dot_env_dot_example
  @dot_env_dot_example
end

#typeObject (readonly)

Returns the value of attribute type.



8
9
10
# File 'lib/dot_example/post_checkout_hook.rb', line 8

def type
  @type
end

Instance Method Details

#stepsObject



10
11
12
# File 'lib/dot_example/post_checkout_hook.rb', line 10

def steps
  "dot_example check"
end