Class: MongoDbUtils::Tools::Option

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo-db-utils/tools/commands.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value) ⇒ Option

Returns a new instance of Option.



77
78
79
80
# File 'lib/mongo-db-utils/tools/commands.rb', line 77

def initialize(key,value)
  @key = key
  @value = value
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



75
76
77
# File 'lib/mongo-db-utils/tools/commands.rb', line 75

def key
  @key
end

#valueObject

Returns the value of attribute value.



75
76
77
# File 'lib/mongo-db-utils/tools/commands.rb', line 75

def value
  @value
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


82
83
84
# File 'lib/mongo-db-utils/tools/commands.rb', line 82

def empty?
  @value.nil? || @value.empty?
end