Module: EditInPlace

Defined in:
lib/edit_in_place.rb,
lib/edit_in_place/builder.rb,
lib/edit_in_place/railtie.rb,
lib/edit_in_place/version.rb,
lib/edit_in_place/registrar.rb,
lib/edit_in_place/field_type.rb,
lib/edit_in_place/configuration.rb,
lib/edit_in_place/field_options.rb,
lib/edit_in_place/extended_builder.rb,
lib/edit_in_place/field_type_registrar.rb,
lib/edit_in_place/unsupported_mode_error.rb,
lib/edit_in_place/invalid_field_type_error.rb,
lib/edit_in_place/duplicate_registration_error.rb,
lib/edit_in_place/unregistered_field_type_error.rb,
lib/edit_in_place/invalid_registration_name_error.rb

Overview

EditInPlace is a namespace that contains all the modules and classes of the edit_in_place Rails gemified plugin.

Author:

  • Jacob Lockard

Since:

  • 0.1.0

Defined Under Namespace

Classes: Builder, Configuration, DuplicateRegistrationError, Error, ExtendedBuilder, FieldOptions, FieldType, FieldTypeRegistrar, InvalidFieldTypeError, InvalidRegistrationNameError, Railtie, Registrar, UnregisteredFieldTypeError, UnsupportedModeError

Constant Summary collapse

VERSION =

Since:

  • 0.1.0

'0.1.0'

Class Method Summary collapse

Class Method Details

.configConfiguration

Gets the ‘Configuration` instance that represents the global configuration for the edit_in_place plugin. The global configuration will be applied to all created Builder instances.

Returns:

See Also:

Since:

  • 0.1.0



39
40
41
# File 'lib/edit_in_place.rb', line 39

def self.config
  @config
end

.config=(config) ⇒ void

This method returns an undefined value.

Sets the ‘Configuration` instance that represents the global configuration for the edit_in_place plugin. A convenient use for this method is to reset the global configuration by setting it to EditInPlace::Configuration.new.

Parameters:

See Also:

Since:

  • 0.1.0



49
50
51
# File 'lib/edit_in_place.rb', line 49

def self.config=(config)
  @config = config
end

.configure {|config| ... } ⇒ void

This method returns an undefined value.

Configures the edit_in_place plugin by yielding the global configuration to the given block. This is a convenient way to configure the plugin. For example:

EditInPlace.configure do |c|
  c.field_options.mode = :editing
  c.defined_middlewares = [SomeMiddleware, AnotherMiddleware]
end

Yield Parameters:

Yield Returns:

  • (void)

See Also:

Since:

  • 0.1.0



64
65
66
# File 'lib/edit_in_place.rb', line 64

def self.configure
  yield config if block_given?
end