Class: Cassandra::Cluster::Schema::Fetchers::MultiVersion::Version
- Inherits:
-
Object
- Object
- Cassandra::Cluster::Schema::Fetchers::MultiVersion::Version
- Defined in:
- lib/cassandra/cluster/schema/fetchers.rb
Instance Method Summary collapse
- #fetcher ⇒ Object
-
#initialize(version, constructor) ⇒ Version
constructor
A new instance of Version.
- #matches?(version) ⇒ Boolean
Constructor Details
#initialize(version, constructor) ⇒ Version
Returns a new instance of Version.
1509 1510 1511 1512 1513 |
# File 'lib/cassandra/cluster/schema/fetchers.rb', line 1509 def initialize(version, constructor) @version = version @constructor = constructor @fetcher = nil end |
Instance Method Details
#fetcher ⇒ Object
1519 1520 1521 |
# File 'lib/cassandra/cluster/schema/fetchers.rb', line 1519 def fetcher @fetcher ||= @constructor.call end |
#matches?(version) ⇒ Boolean
1515 1516 1517 |
# File 'lib/cassandra/cluster/schema/fetchers.rb', line 1515 def matches?(version) version.start_with?(@version) end |