Class: Isomorphic::Inflector::AbstractInflector Abstract
- Inherits:
-
Object
- Object
- Isomorphic::Inflector::AbstractInflector
- Defined in:
- lib/isomorphic/inflector.rb
Overview
This class is abstract.
Generic base class for Isomorphic inflectors.
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
Instance Method Summary collapse
-
#convert_hash(constructor = {}) ⇒ Isomorphic::HashWithIndifferentAccess
Inflect upon the given hash or constructor for a hash.
-
#initialize(base) ⇒ AbstractInflector
constructor
Default constructor.
-
#isomorphism(terms) ⇒ String
Inflect upon the given terms.
Constructor Details
#initialize(base) ⇒ AbstractInflector
Default constructor
79 80 81 82 83 |
# File 'lib/isomorphic/inflector.rb', line 79 def initialize(base) super() @base = base end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
74 75 76 |
# File 'lib/isomorphic/inflector.rb', line 74 def base @base end |
Instance Method Details
#convert_hash(constructor = {}) ⇒ Isomorphic::HashWithIndifferentAccess
Inflect upon the given hash or constructor for a hash.
90 91 92 |
# File 'lib/isomorphic/inflector.rb', line 90 def convert_hash(constructor = {}) Isomorphic::HashWithIndifferentAccess.new(self, constructor) end |
#isomorphism(terms) ⇒ String
Inflect upon the given terms.
112 113 114 |
# File 'lib/isomorphic/inflector.rb', line 112 def isomorphism(terms) isomorphism_for(terms) end |