Sha256: 595c923e4adfe1ea667f653741caa0d949fd748345046f8a3b0470ebe0c621e0

Contents?: true

Size: 539 Bytes

Versions: 4

Compression:

Stored size: 539 Bytes

Contents

require 'retrospec/plugins/v1/context_object'

module <%= capitalized_plugin_name %>
  # this object is passed to the templates for erb template rendering
  # you can use data contained in this object in your templates
  class SpecObject < Retrospec::Plugins::V1::ContextObject

    attr_reader :instance, :module_path, :module_name

    def initialize(mod_path, data)
      @instance = data
      @module_path = mod_path
    end

    def module_path
      @module_path
    end

    def module_name
      instance[:name]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
retrospec-plugingen-0.3.0 lib/retrospec/plugins/v1/plugin/templates/module_files/lib/retrospec/plugins/v1/plugin/spec_object.rb.retrospec.erb
retrospec-plugingen-0.2.2 lib/retrospec/plugins/v1/plugin/templates/module_files/lib/retrospec/plugins/v1/plugin/spec_object.rb.retrospec.erb
retrospec-plugingen-0.2.1 lib/retrospec/plugins/v1/plugin/templates/module_files/lib/retrospec/plugins/v1/plugin/spec_object.rb.erb
retrospec-plugingen-0.2.0 lib/retrospec/plugins/v1/plugin/templates/module_files/lib/retrospec/plugins/v1/plugin/spec_object.rb.erb