Module: CaTissue::Resource
- Includes:
- CaRuby::Resource, Jinx::IdAlias
- Included in:
- CaTissue, Annotatable, Annotation
- Defined in:
- lib/catissue/resource.rb
Instance Method Summary collapse
-
#database ⇒ Database
The database which stores this object.
-
#tolerant_match?(other, attributes) ⇒ Boolean
Returns whether each of the given attribute values either equals the respective other attribute value or one of the values is nil or ‘Not Specified’.
Instance Method Details
#database ⇒ Database
Returns the database which stores this object.
22 23 24 |
# File 'lib/catissue/resource.rb', line 22 def database Database.current end |
#tolerant_match?(other, attributes) ⇒ Boolean
Returns whether each of the given attribute values either equals the respective other attribute value or one of the values is nil or ‘Not Specified’.
17 18 19 |
# File 'lib/catissue/resource.rb', line 17 def tolerant_match?(other, attributes) attributes.all? { |pa| Resource.tolerant_value_match?(send(pa), other.send(pa)) } end |