module LightParams::PropertiesConfiguration

Public Class Methods

included(base) click to toggle source
# File lib/light_params/properties_configuration.rb, line 6
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

respond_to?(method_name, include_private = false) click to toggle source
Calls superclass method
# File lib/light_params/properties_configuration.rb, line 74
def respond_to?(method_name, include_private = false)
  return _properties.include?(method_name.to_s.delete('=').to_sym) unless super
  false
end

Private Instance Methods

_properties() click to toggle source
# File lib/light_params/properties_configuration.rb, line 81
def _properties
  self.class.config[:properties] || {}
end
attributes() click to toggle source
# File lib/light_params/properties_configuration.rb, line 91
def attributes
  OpenStruct.new(keys: _properties)
end
method_missing(method, *args, &block) click to toggle source
Calls superclass method
# File lib/light_params/properties_configuration.rb, line 85
def method_missing(method, *args, &block)
  method_writer = method.to_s[-1] == '='
  return (method_writer ? self.[]=(method.to_s[-1].to_sym, *args, &block) : self.[](method, *args, &block)) if respond_to?(method)
  super
end