Sha256: 0ba94e3a1c631201353d46b3261c5be5a803542ce17cb451df46e0c4d7e7a057

Contents?: true

Size: 574 Bytes

Versions: 8

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true

class Book
  attr_accessor :name, :description, :isbn

  def initialize(name, description, isbn)
    @name = name
    @description = description
    @isbn = isbn
  end

  comma do
    name 'Title'
    description

    isbn authority: :issuer
    isbn number_10: 'ISBN-10'
    isbn number_13: 'ISBN-13'
  end

  comma :brief do
    name
    description
  end
end

class Isbn
  attr_accessor :number_10, :number_13

  def initialize(isbn_10, isbn_13)
    @number_10 = isbn_10
    @number_13 = isbn_13
  end

  def authority
    'ISBN'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
comma-4.8.0 spec/non_rails_app/ruby_classes.rb
comma-4.7.0 spec/non_rails_app/ruby_classes.rb
comma-4.6.0 spec/non_rails_app/ruby_classes.rb
comma-4.5.0 spec/non_rails_app/ruby_classes.rb
comma-4.4.0 spec/non_rails_app/ruby_classes.rb
comma-4.3.2 spec/non_rails_app/ruby_classes.rb
comma-4.3.1 spec/non_rails_app/ruby_classes.rb
comma-4.3.0 spec/non_rails_app/ruby_classes.rb