Class: RubyIdentifier
- Inherits:
-
Object
- Object
- RubyIdentifier
- Defined in:
- lib/pry-globs/ruby_identifier.rb
Instance Attribute Summary collapse
-
#cli_args ⇒ Object
readonly
Returns the value of attribute cli_args.
-
#token_table ⇒ Object
readonly
Returns the value of attribute token_table.
Instance Method Summary collapse
- #absent_from_table? ⇒ Boolean
- #absent_msg ⇒ Object
- #description ⇒ Object
-
#initialize(cli_args, identifier_table) ⇒ RubyIdentifier
constructor
A new instance of RubyIdentifier.
Constructor Details
#initialize(cli_args, identifier_table) ⇒ RubyIdentifier
Returns a new instance of RubyIdentifier.
4 5 6 7 |
# File 'lib/pry-globs/ruby_identifier.rb', line 4 def initialize(cli_args, identifier_table) @token_table = identifier_table @cli_args = cli_args end |
Instance Attribute Details
#cli_args ⇒ Object (readonly)
Returns the value of attribute cli_args.
2 3 4 |
# File 'lib/pry-globs/ruby_identifier.rb', line 2 def cli_args @cli_args end |
#token_table ⇒ Object (readonly)
Returns the value of attribute token_table.
2 3 4 |
# File 'lib/pry-globs/ruby_identifier.rb', line 2 def token_table @token_table end |
Instance Method Details
#absent_from_table? ⇒ Boolean
13 14 15 |
# File 'lib/pry-globs/ruby_identifier.rb', line 13 def absent_from_table? token_data.nil? end |
#absent_msg ⇒ Object
17 18 19 |
# File 'lib/pry-globs/ruby_identifier.rb', line 17 def absent_msg absent_from_table? ? "There is no information about '#{token}'.\n\nPlease submit data and open a PR!\n" : '' end |
#description ⇒ Object
9 10 11 |
# File 'lib/pry-globs/ruby_identifier.rb', line 9 def description definition + explanation end |