Class: Struct

Inherits:
Object
  • Object
show all
Includes:
Everythingrb::InspectQuotable
Defined in:
lib/everythingrb/struct.rb

Overview

Extensions to Ruby’s core Struct class

Provides:

  • #in_quotes, #with_quotes: Wrap struct in quotes

Examples:

require "everythingrb/struct"

Person = Struct.new(:name, :profile)
person = Person.new("Alice", {roles: ["admin"]})

Method Summary

Methods included from Everythingrb::InspectQuotable

#in_quotes