Class: SchemaDev::Config::Tuple
- Inherits:
-
Struct
- Object
- Struct
- SchemaDev::Config::Tuple
- Defined in:
- lib/schema_dev/config.rb
Instance Attribute Summary collapse
-
#activerecord ⇒ Object
Returns the value of attribute activerecord.
-
#db ⇒ Object
Returns the value of attribute db.
-
#dbversion ⇒ Object
Returns the value of attribute dbversion.
-
#ruby ⇒ Object
Returns the value of attribute ruby.
Instance Method Summary collapse
Instance Attribute Details
#activerecord ⇒ Object
Returns the value of attribute activerecord
93 94 95 |
# File 'lib/schema_dev/config.rb', line 93 def activerecord @activerecord end |
#db ⇒ Object
Returns the value of attribute db
93 94 95 |
# File 'lib/schema_dev/config.rb', line 93 def db @db end |
#dbversion ⇒ Object
Returns the value of attribute dbversion
93 94 95 |
# File 'lib/schema_dev/config.rb', line 93 def dbversion @dbversion end |
#ruby ⇒ Object
Returns the value of attribute ruby
93 94 95 |
# File 'lib/schema_dev/config.rb', line 93 def ruby @ruby end |
Instance Method Details
#match?(other) ⇒ Boolean
94 95 96 97 98 99 100 101 |
# File 'lib/schema_dev/config.rb', line 94 def match?(other) return false if ruby and other.ruby and ruby != other.ruby return false if activerecord and other.activerecord and activerecord != other.activerecord return false if db and other.db and db != other.db return false if dbversion and other.dbversion and dbversion != other.dbversion true end |
#match_any?(others) ⇒ Boolean
103 104 105 |
# File 'lib/schema_dev/config.rb', line 103 def match_any?(others) others.any? { |other| match? other } end |
#to_hash ⇒ Object
107 108 109 |
# File 'lib/schema_dev/config.rb', line 107 def to_hash to_h.compact.transform_values(&:to_s) end |