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-3.0.2 lib/jets/stack/depends/item.rb
jets-3.0.1 lib/jets/stack/depends/item.rb
jets-3.0.0 lib/jets/stack/depends/item.rb
jets-2.3.18 lib/jets/stack/depends/item.rb
jets-2.3.17 lib/jets/stack/depends/item.rb
jets-2.3.16 lib/jets/stack/depends/item.rb
jets-2.3.15 lib/jets/stack/depends/item.rb
jets-2.3.14 lib/jets/stack/depends/item.rb
jets-2.3.13 lib/jets/stack/depends/item.rb
jets-2.3.12 lib/jets/stack/depends/item.rb
jets-2.3.11 lib/jets/stack/depends/item.rb
jets-2.3.10 lib/jets/stack/depends/item.rb
jets-2.3.9 lib/jets/stack/depends/item.rb
jets-2.3.8 lib/jets/stack/depends/item.rb
jets-2.3.7 lib/jets/stack/depends/item.rb
jets-2.3.6 lib/jets/stack/depends/item.rb
jets-2.3.5 lib/jets/stack/depends/item.rb
jets-2.3.4 lib/jets/stack/depends/item.rb
jets-2.3.3 lib/jets/stack/depends/item.rb
jets-2.3.2 lib/jets/stack/depends/item.rb