Sha256: cb7d3ab909b2139582719eb7a37b4a2e3200926628c9e497acd64baa59f12130

Contents?: true

Size: 728 Bytes

Versions: 90

Compression:

Stored size: 728 Bytes

Contents

# Usage examples:
#
#   Jets::Stack::Depends::Item.new(:custom)
#   Jets::Stack::Depends::Item.new(:custom, :alert)
#   Jets::Stack::Depends::Item.new(:custom, class_prefix: true)
#   Jets::Stack::Depends::Item.new(:custom, :alert, class_prefix: true)
#
# The Jets::Stack::Depends#params uses the options to determine if the class prefix should be added.
#
class Jets::Stack::Depends
  class Item
    attr_reader :stack, :options
    def initialize(stack, options={})
      @stack = stack # should be underscore format. IE: admin/posts_controller
      @options = options
    end

    def logical_id
      @stack.to_s.gsub('::','').gsub('/','_').camelize
    end

    def class_name
      @stack.to_s.camelize
    end
  end
end

Version data entries

90 entries across 90 versions & 2 rubygems

Version Path
jets-4.0.12 lib/jets/stack/depends/item.rb
jets-4.0.11 lib/jets/stack/depends/item.rb
jets-5.0.13 lib/jets/stack/depends/item.rb
jets-5.0.12 lib/jets/stack/depends/item.rb
jets-5.0.11 lib/jets/stack/depends/item.rb
jets-5.0.10 lib/jets/stack/depends/item.rb
jets-5.0.9 lib/jets/stack/depends/item.rb
jets-5.0.8 lib/jets/stack/depends/item.rb
jets-5.0.7 lib/jets/stack/depends/item.rb
jets-5.0.6 lib/jets/stack/depends/item.rb
jets-5.0.5 lib/jets/stack/depends/item.rb
jets-5.0.4 lib/jets/stack/depends/item.rb
jets-5.0.3 lib/jets/stack/depends/item.rb
jets-5.0.2 lib/jets/stack/depends/item.rb
jets-5.0.1 lib/jets/stack/depends/item.rb
jets-5.0.0 lib/jets/stack/depends/item.rb
jets-4.0.10 lib/jets/stack/depends/item.rb
jets-5.0.0.beta1 lib/jets/stack/depends/item.rb
jets-4.0.9 lib/jets/stack/depends/item.rb
jets-4.0.8 lib/jets/stack/depends/item.rb