Class: CheckInput

Inherits:
Object
  • Object
show all
Defined in:
lib/asker/check_input.rb

Instance Method Summary collapse

Constructor Details

#initialize(verbose = true) ⇒ CheckInput

Returns a new instance of CheckInput.



5
6
7
# File 'lib/asker/check_input.rb', line 5

def initialize(verbose = true)
  @verbose = verbose
end

Instance Method Details

#checkObject



19
20
21
22
23
24
# File 'lib/asker/check_input.rb', line 19

def check
  # Check HAML file syntax
  exist = check_file_exist
  return false unless exist
  check_file_content
end

#file(filepath) ⇒ Object



9
10
11
12
# File 'lib/asker/check_input.rb', line 9

def file(filepath)
  @filepath = filepath
  self
end

#verbose(verbose) ⇒ Object



14
15
16
17
# File 'lib/asker/check_input.rb', line 14

def verbose(verbose)
  @verbose = verbose
  self
end