Class: HecksDomainBuilder::Reference
- Inherits:
-
Object
- Object
- HecksDomainBuilder::Reference
- Defined in:
- lib/domain_builder/reference.rb
Overview
Represents a reference object
Instance Method Summary collapse
-
#initialize(reference) ⇒ Reference
constructor
A new instance of Reference.
- #name ⇒ Object
- #referenced_entity ⇒ Object
Constructor Details
#initialize(reference) ⇒ Reference
Returns a new instance of Reference.
4 5 6 |
# File 'lib/domain_builder/reference.rb', line 4 def initialize(reference) @reference = reference end |
Instance Method Details
#name ⇒ Object
12 13 14 |
# File 'lib/domain_builder/reference.rb', line 12 def name @reference.split("::").last.camelcase + "Reference" end |
#referenced_entity ⇒ Object
8 9 10 |
# File 'lib/domain_builder/reference.rb', line 8 def referenced_entity @reference.split("::").map(&:camelcase).join("::") end |