module Shogun::Normalizer
Public Instance Methods
as_meta()
click to toggle source
# File lib/shogun/normalizer.rb, line 13 def as_meta metadata.inject({}) do |hash, meta| if public_send(meta) hash.merge(meta => public_send(meta)) else hash end end end
to_hash()
click to toggle source
# File lib/shogun/normalizer.rb, line 3 def to_hash attributes.inject({}) do |hash, attribute| if public_send(attribute) hash.merge(attribute => public_send(attribute)) else hash end end end
Private Instance Methods
attributes()
click to toggle source
# File lib/shogun/normalizer.rb, line 23 def attributes self.class.const_get("ATTRIBUTES") end
metadata()
click to toggle source
# File lib/shogun/normalizer.rb, line 27 def metadata self.class.const_get("METADATA") end
namespace()
click to toggle source
# File lib/shogun/normalizer.rb, line 31 def namespace self.class.const_get("NAMESPACE") end