class Pakyow::Reflection::Nested

@api private

Attributes

attributes[R]
name[R]
nested[R]

Public Class Methods

new(name, attributes: [], nested: []) click to toggle source
# File lib/pakyow/reflection/nested.rb, line 11
def initialize(name, attributes: [], nested: [])
  @name, @attributes, @nested = normalize(name), attributes, nested
end

Public Instance Methods

named?(name) click to toggle source
# File lib/pakyow/reflection/nested.rb, line 15
def named?(name)
  @name == normalize(name)
end
plural_name() click to toggle source
# File lib/pakyow/reflection/nested.rb, line 19
def plural_name
  Support.inflector.pluralize(@name).to_sym
end

Private Instance Methods

normalize(name) click to toggle source
# File lib/pakyow/reflection/nested.rb, line 25
def normalize(name)
  name.to_s.to_sym
end