module Seriline

This class represents a simple struct like object.
- Permitted attributes must be defined with `attr_reader`
- When initialized attribute keys will be snake cased.
  For example { CamelCase: "Hello world!" }
  would set the instance variable @camel_case

Example:

class PersonResponse < Seriline::ResponseData
  attr_reader :name, :email
end

PersonResponse.new({
  name: "Bob",
  email: "bob-the-builder@gmail.com",
  password: "secret"
})

> #<PersonResponse:0x007fca321df778 @name=“Bob”, @email=“bob-the-builder@gmail.com”>

Constants

VERSION

Attributes

config[RW]

Public Class Methods

configure() { |config| ... } click to toggle source
# File lib/seriline.rb, line 15
def self.configure
  self.config ||= Configuration.new
  yield(config)
end