Class: Context::DSL::PluginBlock

Inherits:
Block
  • Object
show all
Defined in:
lib/mashfeed/dsl.rb

Overview

make plugin statement

Instance Attribute Summary

Attributes inherited from Block

#child_statements, #context_dsl, #parent_block

Instance Method Summary collapse

Methods inherited from Block

#execute

Constructor Details

#initialize(context_dsl, parent_block, name) ⇒ PluginBlock

Returns a new instance of PluginBlock.



39
40
41
42
# File 'lib/mashfeed/dsl.rb', line 39

def initialize(context_dsl, parent_block, name)
  super
  @statement = Statement.new(Mashfeed::Plugin[name.to_s].new)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object

delegating of @statement



45
46
47
# File 'lib/mashfeed/dsl.rb', line 45

def method_missing(name, *args)
  @statement.send(name, *args)
end

Instance Method Details

#to_statementObject



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

def to_statement
  @statement
end