Class: PGit::ResponseHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/pgit/response_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#questionObject (readonly)

Returns the value of attribute question.



3
4
5
# File 'lib/pgit/response_handler.rb', line 3

def question
  @question
end

Instance Method Details

#execute!Object



4
5
6
7
8
9
10
# File 'lib/pgit/response_handler.rb', line 4

def execute!
  if response_can_be_handled?
    @question.ask do |response|
      @response_handlers.each {|handler| handler.new(options(response)).execute! }
    end
  end
end

#response_can_be_handled?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/pgit/response_handler.rb', line 12

def response_can_be_handled?
  true
end