similar to: accessing a variable inside a plugin

Displaying 20 results from an estimated 1000 matches similar to: "accessing a variable inside a plugin"

2006 Aug 08
2
Extending rails with plugins
I''ve been looking at bottling some functionality up into a plugin, but I''m having some problems including it. The structure I have is: /app/controllers/admin/base_controller.rb: class Admin::BaseController > ApplicationController #snip# end /vendor/plugins/myplugin/lib/my_module.rb: module MyModule def new_func "New Function" end end
2006 Jun 18
4
share an hash ..
Hello, How to share an Hash between all objects (model, controller ect ...) => I did a static Hash in my model where a static method fill it basically, this is the code class Person < ActiveModel @@anHash.new def Person.anHelperMethod(aKey) if anHash.size==0 ... load the hash, some SQL to fill the Hash end return anHash[aKey] end => The problem,: it always
2012 Sep 28
2
nested modules and autoloading
All- I''m using puppet 2.7.14. I''ve reviewed http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html but it doesn''t seem to cover what I''m attempting. Consider a module layout like this: $ tree mymodule mymodule |-- Modulefile |-- README |-- manifests | |-- init.pp | |-- special_type | | `-- prereqs.pp | `-- special_type.pp
2008 Feb 18
3
Calling a controller inside a module
I tryied everything: :controller => ''MyModule::Core::Controller'' require ''MyModule/core/controller'' include MyModule::Core But nothing works !!! Question is very simple: How to call a controller that belongs to a Module inside the router.rb file? This cannot be that difficult! Thanks! -Sergio -------------- next part -------------- An HTML attachment
2011 May 19
1
Module in Rails
Hi, I want to use module in Rails 3 I have module in /lib directory. file name: my_module.rb Code of Module: module MyModule def self.my_method loop do puts "I am started!!!" sleep 2 end end end Now, I want to use this module in my rb file resides in app_root/daemon directory named myserver.rb How can i use that? -- You received this message
2008 Oct 28
7
How to override one method of AssetTagHelper
I created a file ./lib/action_view/helpers/asset_tag_helper.rb and put in it only the method I want to override. like this module ActionView module Helpers #:nodoc: module AssetTagHelper def image_path(source) compute_public_path(source, ''images'') end end end end But as soon I try this all the others methods from the overriden module are not
2010 Jul 30
5
Parameterised Classes in 2.6.0... still no luck
I downloaded the latest version of puppet 2.6.0 today, and still can''t get parameterised classes to work. At least, I think it''s 2.6.0... the version number in the RPM spec file says 0.25.5. This simple example: /etc/puppet/manifests/nodes/pax/name01.pax.xxx.com.pp: node ''name01.pax.xxx.com'' { class { amodule::afunc: version => "1.0" } }
2011 Aug 09
3
[LLVMdev] Adding a module in a pass
I have an optimization pass (FunctionPass) where I need to add global constructors. For cleaness sake I decided to add these in my own module. My module is created in my FunctionPass constructor: MyPass() : FunctionPass(ID), myModule("my_module", getGlobalContext()) {} I generate an llvm.global_ctor global variable in my module, and I add my global constructors
2013 Jan 18
3
Puppet 2.6 - Custom functions - environments issue
Hello every one, I have looked at a lots of threads in the Puppet User group but I did not find a clear answer or explanation how custom functions work.... Here is my current setup : * I have *2 "environments"*. working fine /etc/puppet/environments/production/ /etc/puppet/environments/test/ * I have a version of my function already working in production * According to the
2006 Jul 24
9
Mongrel: auto-reload plugins?
When developing applications, Webrick will automatically reload controllers, models, etc. if the source changes. For obvious reasons, it doesn''t do this for plugins, which makes it a pain to develop said plugins. I was hoping Mongrel might have some facility to say "watch this directory too and reload any changes". Obviously, re-init''ing all plugins would be
2007 Apr 16
5
AAF: merge search results
Hi, I have a user model that has a couple of other models(like street address, tasks). suppose User has a name field Address has a state field. so I want to provide a detailed search form each field in the user and its related models can be specified. Suppose I have a user that has a name "california", and that user has a address with the state field being "california" as
2010 May 13
0
[LLVMdev] Handling of thread_local globals by llc -march=cpp
Hello > I've been exploring thread local globals in llvm and as part of this investigation I ran llc -march=cpp over a trivial llvm bc file which uses thread local storage for a global. For some reason llc -march=cpp seems to ignore the thread_local and produce code to create a standard global. Is this expected behaviour, a known limitation, or otherwise? Thanks for the report. Should be
2010 May 13
0
[LLVMdev] Handling of thread_local globals by llc -march=cpp
I note also that this is not a currently unsupported target case where an error should/could/would be produced on attempting to emit code with thread local references. I say this because clang is able to compile both c source with __thread on a global and bc containing a @variable = thread_local global ... and a function that references the thread local global variable to both assembly and machine
2010 May 13
3
[LLVMdev] Handling of thread_local globals by llc -march=cpp
target triple = "i386-pc-linux-gnu" On 13/05/2010, at 9:25 PM, Anton Korobeynikov wrote: >> int (*FP)() = (int (*)())FPtr; >> int res = FP(); >> >> when the function executes correctly in the case of instead having created a standard global variable. > What is the platform you're running the code on? > > -- > With best regards, Anton
2010 May 13
2
[LLVMdev] Handling of thread_local globals by llc -march=cpp
Hi all, I've been exploring thread local globals in llvm and as part of this investigation I ran llc -march=cpp over a trivial llvm bc file which uses thread local storage for a global. For some reason llc -march=cpp seems to ignore the thread_local and produce code to create a standard global. Is this expected behaviour, a known limitation, or otherwise? Thanks in advance. Details are as
2006 Feb 24
5
Sanity Check
Maaaaaaaaaaaaajor sanity check needed. I wrote a simple little plugin, and it wouldn''t load. I put some comments in it''s init.rb, and it didn''t even spit those out. So, I dug into the initializer.rb (/vendor/rails/railties/lib/initializer.rb) to see wtf is going on, and found the problem... but... can''t explain it. Here is the code in question:
2015 Feb 18
3
[LLVMdev] Calling into non-linked function via a pointer
I'm having a problem of being unable to call into an arbitrary function that is loaded into memory whose pointer address is known to me but was not linked into LLVM. I have added the function and called LLVMAddGlobalMapping with the pointer, and the program segfaults. I was wondering if it is a supported scenario that LLVM can generate a call into an arbitrary function that is not linked.
2009 Oct 11
1
passing model data to a plugin called within that model
I am making a plugin which extends ActiveRecord::Base I have the plugin working in my models in other aspects. I would like to pass in some data to the plugin, but I can''t get the data I would like. so if I have: class Stuff < ActiveRecord::Base belongs_to :thing my_plugin :id => self.thing.other_id end it chokes on figuring out what to do with self.thing.other_id.
2007 Apr 13
21
ZenTest autotest now handles RSpec, yay!
Josh Knowles http://joshknowles.com/ just let me know that ZenTest Autotest 3.50 now handles your RSpec specs. http://blog.zenspider.com/archives/2007/04/zentest_version_350_has_been_released.html That''s a great news. Josh also shared with me a quick hack to make autotest work with only the RSpec plugin installed. Add the following into your ~/.autotest file
2017 Feb 19
2
Fwd: nbdkit async
----- Forwarded message ----- Date: Sat, 18 Feb 2017 22:21:19 -0500 Subject: nbdkit async Hello, Hope this is the right person to contact regarding nbdkit design. I have a high latency massively parallel device that I am currently implementing as an nbdkit plugin in c++ and have run into some design limitations due to the synchronous callback interface nbdkit requires. Nbdkit is currently