Sha256: 409e50540c3028224388c64eb1d1a201649b0990a1613d42a1c4566d24456b40

Contents?: true

Size: 633 Bytes

Versions: 62

Compression:

Stored size: 633 Bytes

Contents

module Workarea
  decorate <%= class_name %>, with: :<%= app_name.optionize %> do
    decorated do
      # Place code to decorate here that would normally go on the class
      # level, e.g.:
      #
      #     field :name, type: String
    end

    class_methods do
      # Place methods to define on the class level here. These methods
      # will be available by calling <%= class_name %>.your_method. Do
      # not prefix these methods with `self.`
    end

    # Instance methods can go right in the main definition of the
    # decorator, as it is a module that gets prepended into the class of
    # your choice.
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.26 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.45 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.25 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.23 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.44 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.22 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.43 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.21 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.42 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.20 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.41 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.19 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.40 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.18 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.39 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.17 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.38 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.5.16 lib/generators/workarea/decorator/templates/decorator.rb.erb
workarea-core-3.4.37 lib/generators/workarea/decorator/templates/decorator.rb.erb