Module: Deface

Defined in:
lib/deface.rb,
lib/deface/digest.rb,
lib/deface/errors.rb,
lib/deface/parser.rb,
lib/deface/search.rb,
lib/deface/railtie.rb,
lib/deface/version.rb,
lib/deface/override.rb,
lib/deface/applicator.rb,
lib/deface/dsl/loader.rb,
lib/deface/dsl/context.rb,
lib/deface/environment.rb,
lib/deface/precompiler.rb,
lib/deface/sources/cut.rb,
lib/deface/sources/erb.rb,
lib/deface/sources/copy.rb,
lib/deface/sources/haml.rb,
lib/deface/sources/slim.rb,
lib/deface/sources/text.rb,
lib/deface/actions/action.rb,
lib/deface/actions/remove.rb,
lib/deface/haml_converter.rb,
lib/deface/matchers/range.rb,
lib/deface/slim_converter.rb,
lib/deface/sources/source.rb,
lib/deface/actions/replace.rb,
lib/deface/sources/partial.rb,
lib/deface/template_helper.rb,
lib/deface/actions/surround.rb,
lib/deface/matchers/element.rb,
lib/deface/sources/template.rb,
lib/deface/actions/insert_top.rb,
lib/deface/original_validator.rb,
lib/deface/actions/insert_after.rb,
lib/deface/utils/failure_finder.rb,
lib/deface/actions/insert_before.rb,
lib/deface/actions/insert_bottom.rb,
lib/deface/actions/element_action.rb,
lib/deface/actions/set_attributes.rb,
lib/deface/actions/surround_action.rb,
lib/deface/actions/attribute_action.rb,
lib/deface/actions/replace_contents.rb,
lib/deface/actions/add_to_attributes.rb,
lib/deface/actions/surround_contents.rb,
lib/generators/deface/override_generator.rb,
lib/deface/actions/remove_from_attributes.rb

Defined Under Namespace

Modules: ActionViewExtensions, Actions, Applicator, DSL, Generators, HamlCompilerMethods, HamlParserMethods, Matchers, OriginalValidator, Search, Sources, TemplateHelper, Utils Classes: DefaceError, Digest, Environment, HamlConverter, NotSupportedError, Override, Parser, Precompiler, Railtie, SlimConverter

Constant Summary collapse

VERSION =
'1.9.0'
DEFAULT_ACTIONS =
[ Actions::Remove, Actions::Replace, Actions::ReplaceContents, Actions::Surround,
Actions::SurroundContents, Actions::InsertBefore, Actions::InsertAfter, Actions::InsertTop,
Actions::InsertBottom, Actions::SetAttributes, Actions::AddToAttributes, Actions::RemoveFromAttributes ]
DEFAULT_SOURCES =
[ Sources::Text, Sources::Erb, Sources::Haml, Sources::Slim, Sources::Partial, Sources::Template, Sources::Cut, Sources::Copy]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.before_rails_6?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/deface.rb', line 48

def self.before_rails_6?
  @before_rails_6
end

.template_classObject



52
53
54
# File 'lib/deface.rb', line 52

def self.template_class
  @template_class
end

Instance Method Details

#gem_versionObject



6
7
8
# File 'lib/deface/version.rb', line 6

def gem_version
  Gem::Version.new(VERSION)
end