Class: Hashape::Specifiers::Specifier
- Inherits:
-
Object
- Object
- Hashape::Specifiers::Specifier
- Defined in:
- lib/hashape.rb
Overview
The basic specifier. You should probably never use this.
Instance Attribute Summary collapse
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Class Method Summary collapse
-
.[](spec) ⇒ Specifier
A shorthand for constructing an instance of any specifier.
Instance Method Summary collapse
-
#initialize(spec) ⇒ Specifier
constructor
Creates a new specifier.
Constructor Details
#initialize(spec) ⇒ Specifier
Creates a new specifier.
29 30 31 |
# File 'lib/hashape.rb', line 29 def initialize(spec) @spec = spec end |
Instance Attribute Details
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
15 16 17 |
# File 'lib/hashape.rb', line 15 def spec @spec end |
Class Method Details
.[](spec) ⇒ Specifier
A shorthand for constructing an instance of any specifier.
21 22 23 |
# File 'lib/hashape.rb', line 21 def self.[](spec) self.new(spec) end |