Class: Globs

Inherits:
Object
  • Object
show all
Defined in:
lib/pry-globs/globs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Globs

Returns a new instance of Globs.



15
16
17
18
# File 'lib/pry-globs/globs.rb', line 15

def initialize(args)
  @cli_args = CLIArg.new(args)
  @ruby_identifier = RubyIdentifier.new(cli_args, IdentifierTable.new)
end

Instance Attribute Details

#cli_argsObject (readonly)

Returns the value of attribute cli_args.



12
13
14
# File 'lib/pry-globs/globs.rb', line 12

def cli_args
  @cli_args
end

#ruby_identifierObject

Returns the value of attribute ruby_identifier.



13
14
15
# File 'lib/pry-globs/globs.rb', line 13

def ruby_identifier
  @ruby_identifier
end

Instance Method Details

#identifier_descriptionObject



20
21
22
23
24
25
# File 'lib/pry-globs/globs.rb', line 20

def identifier_description
  return cli_args.invalid_msg       if cli_args.invalid?
  return ruby_identifier.absent_msg if ruby_identifier.absent_from_table?

  ruby_identifier.description
end