Module: Stannum
- Defined in:
- lib/stannum.rb,
lib/stannum/rspec.rb,
lib/stannum/entity.rb,
lib/stannum/errors.rb,
lib/stannum/schema.rb,
lib/stannum/struct.rb,
lib/stannum/support.rb,
lib/stannum/version.rb,
lib/stannum/contract.rb,
lib/stannum/entities.rb,
lib/stannum/messages.rb,
lib/stannum/attribute.rb,
lib/stannum/contracts.rb,
lib/stannum/constraint.rb,
lib/stannum/association.rb,
lib/stannum/constraints.rb,
lib/stannum/associations.rb,
lib/stannum/parameter_validation.rb
Overview
A library for specifying and validating data structures.
Defined Under Namespace
Modules: Associations, Constraints, Contracts, Entities, Entity, Messages, ParameterValidation, RSpec, Struct, Support, Version Classes: Association, Attribute, Constraint, Contract, Errors, Schema
Constant Summary collapse
- VERSION =
The current version of the gem in Rubygems format.
Version.to_gem_version
Class Method Summary collapse
-
.gem_path ⇒ String
The absolute path to the gem directory.
-
.version ⇒ String
The current version of the gem.
Class Method Details
.gem_path ⇒ String
Returns the absolute path to the gem directory.
23 24 25 26 27 |
# File 'lib/stannum.rb', line 23 def self.gem_path pattern = /#{File::SEPARATOR}lib#{File::SEPARATOR}?\z/ __dir__.sub(pattern, '') end |
.version ⇒ String
Returns the current version of the gem.
30 31 32 |
# File 'lib/stannum.rb', line 30 def self.version @version ||= Stannum::Version.to_gem_version end |