Module: ConsoleUpdate
- Defined in:
- lib/console_update.rb,
lib/console_update/filter.rb,
lib/console_update/version.rb,
lib/console_update/filter/yaml.rb,
lib/console_update/named_scope.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods, NamedScope, SingletonMethods Classes: Filter
Constant Summary collapse
- VERSION =
'0.1.6'
Class Attribute Summary collapse
-
.editor ⇒ Object
Returns the value of attribute editor.
-
.filter ⇒ Object
Returns the value of attribute filter.
Class Method Summary collapse
-
.enable_named_scope ⇒ Object
Adds a global scoped method, console_update(), which can be chained to the end of any named scopes.
-
.included(base) ⇒ Object
:nodoc:.
Class Attribute Details
.editor ⇒ Object
Returns the value of attribute editor.
7 8 9 |
# File 'lib/console_update.rb', line 7 def editor @editor end |
.filter ⇒ Object
Returns the value of attribute filter.
7 8 9 |
# File 'lib/console_update.rb', line 7 def filter @filter end |
Class Method Details
.enable_named_scope ⇒ Object
Adds a global scoped method, console_update(), which can be chained to the end of any named scopes. For example, if Url has a named scope :tagged_with:
Url.tagged_with('physics').console_update
7 8 9 |
# File 'lib/console_update/named_scope.rb', line 7 def self.enable_named_scope ActiveRecord::NamedScope::Scope.send :include, NamedScope end |
.included(base) ⇒ Object
:nodoc:
8 9 10 11 12 |
# File 'lib/console_update.rb', line 8 def self.included(base) #:nodoc: @filter = :yaml @editor = ENV["EDITOR"] base.extend ClassMethods end |