Class: PgEventstore::Extensions::OptionsExtension::Option
- Inherits:
-
Object
- Object
- PgEventstore::Extensions::OptionsExtension::Option
- Defined in:
- lib/pg_eventstore/extensions/options_extension.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Boolean
- #eql?(other) ⇒ Boolean
- #hash ⇒ Integer
-
#initialize(name, metadata: nil) ⇒ Option
constructor
A new instance of Option.
Constructor Details
#initialize(name, metadata: nil) ⇒ Option
Returns a new instance of Option.
46 47 48 49 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 46 def initialize(name, metadata: nil) @name = name = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
42 43 44 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 42 def end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
42 43 44 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 42 def name @name end |
Instance Method Details
#==(other) ⇒ Boolean
53 54 55 56 57 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 53 def ==(other) return false unless other.is_a?(Option) name == other.name end |
#eql?(other) ⇒ Boolean
61 62 63 64 65 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 61 def eql?(other) return false unless other.is_a?(Option) name.eql?(other.name) end |
#hash ⇒ Integer
68 69 70 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 68 def hash name.hash end |