module Material::Core

Public Class Methods

new(object) click to toggle source
# File lib/material/concerns/core.rb, line 28
def initialize(object)
  raise ArgumentError, "source is required" if object.nil?

  @source = object
end

Public Instance Methods

references(field, as:, from: :source) click to toggle source
# File lib/material/concerns/core.rb, line 22
def references(field, as:, from: :source)
  delegate field, to: from
  alias_method as, field
end