Module: MetaManager::Taggable::Extension

Defined in:
lib/meta_manager/taggable.rb

Overview

some required extentions

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_sym, *args) ⇒ Object



21
22
23
24
25
26
# File 'lib/meta_manager/taggable.rb', line 21

def method_missing(method_sym, *args)
  key = method_sym.to_s
  return read_or_update(key, args.first) if key =~ meta_match_case

  super
end

Instance Method Details

#respond_to_missing?(method_sym, include_all = false) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
18
19
# File 'lib/meta_manager/taggable.rb', line 15

def respond_to_missing?(method_sym, include_all = false)
  return true if method_sym.to_s =~ meta_match_case

  super
end