Sha256: a8918efda58da834224ea4727600f82213ce4254bbf84bcb90a30f8021a72fa0

Contents?: true

Size: 207 Bytes

Versions: 2

Compression:

Stored size: 207 Bytes

Contents

class AuthorComponent
  include Rafters::Component

  # Settings
  setting :id, required: true

  # Attributes
  attribute :author

  private

  def author
    @author ||= Author.find(settings.id)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rafters-0.0.4 spec/dummy/app/components/author/author_component.rb
rafters-0.0.3 spec/dummy/app/components/author/author_component.rb