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_option) ⇒ Boolean
- #eql?(other_option) ⇒ 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.
48 49 50 51 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 48 def initialize(name, metadata: nil) @name = name @metadata = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
44 45 46 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 44 def @metadata end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
44 45 46 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 44 def name @name end |
Instance Method Details
#==(other_option) ⇒ Boolean
55 56 57 58 59 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 55 def ==(other_option) return false unless other_option.is_a?(Option) name == other_option.name end |
#eql?(other_option) ⇒ Boolean
63 64 65 66 67 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 63 def eql?(other_option) return false unless other_option.is_a?(Option) name.eql?(other_option.name) end |
#hash ⇒ Integer
70 71 72 |
# File 'lib/pg_eventstore/extensions/options_extension.rb', line 70 def hash name.hash end |