Tagged Questions
0
votes
1answer
16 views
Module loading issue in Ruby
I'm fairly new to Ruby so bare with me if I'm just doing something foolish. I have a situation where I can access a module's functions from one file but not another. These files are both in the same ...
1
vote
1answer
39 views
Access VBA Classes Arrays
Im trying to use some classes that will hold invoice data and I cant seem to get it working. I just want it to save details of an invoice in an array. Heres the code, maybe someone can figure it out.
...
2
votes
1answer
1k views
python MySQL module class file name
I am confused how directory name, file name and class name all work together.
This is what I have at the moment
app.py
database/
client.py
staff.py
order.py
Inside client.py I ...
1
vote
4answers
54 views
Progammatically turn module/set of functions into a Python class
Suppose I have a file with a bunch methods as bunch_methods.py:
def one(x):
return int(x)
def two(y)
return str(y)
Is there a way to take that group of methods by importing the module whole or ...
1
vote
3answers
97 views
C# Static Class vs VB.NET Module usage
I'm having difficulty calling a function from a C# Class in a similar way that I call a function from a VB.NET Module.
I have a C# class General.cs
using System;
namespace XYZ.Classes
{
...
13
votes
1answer
8k views
Including a Ruby class from a separate file
For a while I had been including an entire class inside of a Ruby module. Apparently this is not what I am supposed to do. It appears that the point of a module is to store functions which can then be ...
1
vote
1answer
27 views
Importing Subclasses from Modules in python
I'm Having an issue when Importing a series of modules and acessing classes within them.
This is my code:
import sys, os
for path, name, files in ...
146
votes
9answers
55k views
Best way to load module/class from lib folder in Rails 3?
Since the latest Rails 3 release is not auto-loading modules and classes from lib anymore,
what would be the best way to load them?
From github:
A few changes were done in this commit:
Do not ...
1
vote
2answers
639 views
Puppet: “Could not find class” hiccups *often* once after manifest/module changes
I’ve got no idea if this is a bug or some kind of misuse/misconfiguration. Hope somebody can help. Thanks!
If I change a file in a module or manifest directory this often results in errors, mostly of ...
1
vote
1answer
112 views
Python - global name is not defined when calling function from class __init__ method
I am new to Python and working on a class for storing meaningful data pieces about books. I have started as follows:
class BookDisplay:
def __init__(self, _name, _isbn, _price, _picture, ...
1
vote
1answer
100 views
TypeScript “use”/alias for Classes
Is there a way to do an alias or "use" (like PHP) for a TypeScript class/module.
Example:
If I have:
module Foo {
class Bar {}
}
Normally I have to write Foo.Bar to use it outside of the ...
4
votes
2answers
117 views
Class, Module, their eigenclasses, and method lookup
Let's open class Module and add a method to it:
class Module
def foo
puts "phew"
end
end
I can call this method by doing this,
Class.foo
which is understandable because class ...
0
votes
0answers
72 views
VBA: Trapping custom class event in Worksheet module
I'm trying to hook into a custom class event from a worksheet module.
Essentially, I am hoping to use the worksheet as a UserForm (for the time being anyway).
Unfortunately, I can't remember if it is ...
1
vote
2answers
53 views
Create hierarchical python object where arguments to methods are from hierarchy
There is an existing module I use containing a class that has methods with string arguments that take the form:
existing_object.existing_method("arg1")
or
...
13
votes
2answers
2k views
Is it possible to give a sub-module the same name as a top-level class?
Background:
ruby thinks I'm referencing a top-level constant even when I specify the full namespace
How do I refer to a submodule's "full path" in ruby?
Here's the problem, ...