module Class2::SnakeCase::Attributes

Support snake_case attributes. This will accept them in the constructor and return them via to_h.

The key format used to define the class will still be accepted and its accessors will remain.

Public Class Methods

included(klass) click to toggle source
# File lib/class2.rb, line 344
def self.included(klass)
  Util.convert_attributes(klass) { |v| v.underscore }
end