Module: Dafuq
- Defined in:
- lib/dafuq.rb,
lib/dafuq/git.rb,
lib/dafuq/code.rb,
lib/dafuq/version.rb,
lib/dafuq/filesystem.rb
Defined Under Namespace
Modules: Code, FileSystem, Git
Constant Summary collapse
- VERSION =
"0.0.3"
Class Attribute Summary collapse
-
.log ⇒ Object
Returns the value of attribute log.
-
.verbose ⇒ Object
Returns the value of attribute verbose.
Class Method Summary collapse
Class Attribute Details
.log ⇒ Object
Returns the value of attribute log.
9 10 11 |
# File 'lib/dafuq.rb', line 9 def log @log end |
.verbose ⇒ Object
Returns the value of attribute verbose.
9 10 11 |
# File 'lib/dafuq.rb', line 9 def verbose @verbose end |
Class Method Details
.is_this ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/dafuq.rb', line 17 def self.is_this Dafuq.verbose = Arg0::Console.switch?(['-v', '--verbose']) Dafuq.log = Arg0::Console.value_for(['-l', '--log']).join recurse = ! Arg0::Console.switch?(['-no-r', '--no-recurse']) Arg0::Console.value_for(['-notail', '--no-whitespace']).each do |no_whitespace_path| Dafuq::Code.notail no_whitespace_path, recurse end Arg0::Console.value_for(['-noswap', '--no-temp-files']).each do |no_temp_path| Dafuq::FileSystem.noswap no_temp_path, recurse end Arg0::Console.value_for(['-gpull', '--git-pull']).each do |repo_base_path| Dafuq::Git.pull repo_base_path, recurse end end |
.log_me(msg) ⇒ Object
12 13 14 15 |
# File 'lib/dafuq.rb', line 12 def self.log_me(msg) puts "[+] #{msg}" if @verbose File.open(@log, 'a+'){|fyl| fyl.puts msg} if File.exists?(@log) end |