Class: CopyTunerIncompatibleSearch::SearchCommand::Usage

Inherits:
Object
  • Object
show all
Defined in:
lib/copy_tuner_incompatible_search/search_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(grep_result, lazy_key = nil) ⇒ Usage

Returns a new instance of Usage.



81
82
83
84
85
86
87
# File 'lib/copy_tuner_incompatible_search/search_command.rb', line 81

def initialize(grep_result, lazy_key = nil)
  file, line, code = grep_result.split(':', 3)
  @file = file
  @line = line
  @code = code.to_s.strip
  @lazy_key = lazy_key
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



79
80
81
# File 'lib/copy_tuner_incompatible_search/search_command.rb', line 79

def code
  @code
end

#fileObject (readonly)

Returns the value of attribute file.



79
80
81
# File 'lib/copy_tuner_incompatible_search/search_command.rb', line 79

def file
  @file
end

#lazy_keyObject (readonly)

Returns the value of attribute lazy_key.



79
80
81
# File 'lib/copy_tuner_incompatible_search/search_command.rb', line 79

def lazy_key
  @lazy_key
end

#lineObject (readonly)

Returns the value of attribute line.



79
80
81
# File 'lib/copy_tuner_incompatible_search/search_command.rb', line 79

def line
  @line
end

Instance Method Details

#initializers?Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/copy_tuner_incompatible_search/search_command.rb', line 89

def initializers?
  file == 'config/initializers/copy_tuner.rb'
end