Class: MongoDbUtils::Tools::Option
- Inherits:
-
Object
- Object
- MongoDbUtils::Tools::Option
- Defined in:
- lib/mongo-db-utils/tools/commands.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(key, value) ⇒ Option
constructor
A new instance of Option.
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
#key ⇒ Object
Returns the value of attribute key.
75 76 77 |
# File 'lib/mongo-db-utils/tools/commands.rb', line 75 def key @key end |
#value ⇒ Object
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
82 83 84 |
# File 'lib/mongo-db-utils/tools/commands.rb', line 82 def empty? @value.nil? || @value.empty? end |