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/constraints.rb,
lib/stannum/parameter_validation.rb
Overview
A library for specifying and validating data structures.
Defined Under Namespace
Modules: Constraints, Contracts, Entities, Entity, Messages, ParameterValidation, RSpec, Struct, Support, Version Classes: 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.
20 21 22 23 24 |
# File 'lib/stannum.rb', line 20 def self.gem_path pattern = /#{File::SEPARATOR}lib#{File::SEPARATOR}?\z/ __dir__.sub(pattern, '') end |
.version ⇒ String
Returns the current version of the gem.
27 28 29 |
# File 'lib/stannum.rb', line 27 def self.version @version ||= Stannum::Version.to_gem_version end |