Class: Pakyow::Reflection::Nested Private
- Inherits:
-
Object
- Object
- Pakyow::Reflection::Nested
- Defined in:
- lib/pakyow/reflection/nested.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly private
- #name ⇒ Object readonly private
- #nested ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(name, attributes: [], nested: []) ⇒ Nested
constructor
private
A new instance of Nested.
- #named?(name) ⇒ Boolean private
- #plural_name ⇒ Object private
Constructor Details
#initialize(name, attributes: [], nested: []) ⇒ Nested
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Nested.
11 12 13 |
# File 'lib/pakyow/reflection/nested.rb', line 11 def initialize(name, attributes: [], nested: []) @name, @attributes, @nested = normalize(name), attributes, nested end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/pakyow/reflection/nested.rb', line 9 def attributes @attributes end |
#name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/pakyow/reflection/nested.rb', line 9 def name @name end |
#nested ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/pakyow/reflection/nested.rb', line 9 def nested @nested end |
Instance Method Details
#named?(name) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/pakyow/reflection/nested.rb', line 15 def named?(name) @name == normalize(name) end |
#plural_name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/pakyow/reflection/nested.rb', line 19 def plural_name Support.inflector.pluralize(@name).to_sym end |