Class: Extentions::Base::Extention
- Inherits:
-
Object
- Object
- Extentions::Base::Extention
- Defined in:
- lib/extentions/base/extention.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.apply(*params) ⇒ Object
7 8 9 10 |
# File 'lib/extentions/base/extention.rb', line 7 def self.apply(*params) extention = new(*params) extention.valid? ? extention : Null::Extention.new end |
.config ⇒ Object
16 17 18 |
# File 'lib/extentions/base/extention.rb', line 16 def self.config @config ||= OpenStruct.new end |
.configure(&block) ⇒ Object
12 13 14 |
# File 'lib/extentions/base/extention.rb', line 12 def self.configure(&block) block.call(config) end |
Instance Method Details
#process ⇒ Object
24 25 26 |
# File 'lib/extentions/base/extention.rb', line 24 def process router.process end |
#render ⇒ Object
20 21 22 |
# File 'lib/extentions/base/extention.rb', line 20 def render router.render end |
#to_token ⇒ Object
28 29 30 31 |
# File 'lib/extentions/base/extention.rb', line 28 def to_token self.class.name.split("::").at(1).downcase.to_sym # Naming.new(self).tokens.last end |
#valid? ⇒ Boolean
33 34 35 |
# File 'lib/extentions/base/extention.rb', line 33 def valid?(*) raise NotImplementedError end |