Module: Spacer
- Defined in:
- lib/spacer.rb,
lib/spacer/auth.rb,
lib/spacer/model.rb,
lib/spacer/client.rb,
lib/spacer/models/mood.rb,
lib/spacer/models/user.rb,
lib/spacer/models/album.rb,
lib/spacer/models/group.rb,
lib/spacer/models/photo.rb,
lib/spacer/models/video.rb,
lib/spacer/models/status.rb,
lib/spacer/models/details.rb,
lib/spacer/models/profile.rb,
lib/spacer/models/interest.rb
Defined Under Namespace
Modules: Model Classes: Album, Authentication, Client, Details, Group, Interest, Mood, Photo, Profile, Status, User, Video
Constant Summary collapse
- STUB_NETWORK =
Change this to false to run tests over the network and not use stubs
true
- VERSION =
:stopdoc:
'0.5.1'
- LIBPATH =
::File.(::File.dirname(__FILE__)) + ::File::SEPARATOR
- PATH =
::File.dirname(LIBPATH) + ::File::SEPARATOR
Class Method Summary collapse
-
.libpath(*args) ⇒ Object
Returns the library path for the module.
-
.path(*args) ⇒ Object
Returns the lpath for the module.
-
.require_all_libs_relative_to(fname, dir = nil) ⇒ Object
Utility method used to rquire all files ending in .rb that lie in the directory below this file that has the same name as the filename passed in.
-
.version ⇒ Object
Returns the version string for the library.
Class Method Details
.libpath(*args) ⇒ Object
Returns the library path for the module. If any arguments are given, they will be joined to the end of the libray path using File.join
.
34 35 36 |
# File 'lib/spacer.rb', line 34 def self.libpath( *args ) args.empty? ? LIBPATH : ::File.join(LIBPATH, *args) end |
.path(*args) ⇒ Object
Returns the lpath for the module. If any arguments are given, they will be joined to the end of the path using File.join
.
42 43 44 |
# File 'lib/spacer.rb', line 42 def self.path( *args ) args.empty? ? PATH : ::File.join(PATH, *args) end |
.require_all_libs_relative_to(fname, dir = nil) ⇒ Object
Utility method used to rquire all files ending in .rb that lie in the directory below this file that has the same name as the filename passed in. Optionally, a specific directory name can be passed in such that the filename does not have to be equivalent to the directory.
51 52 53 54 55 56 57 58 59 |
# File 'lib/spacer.rb', line 51 def self.require_all_libs_relative_to( fname, dir = nil ) dir ||= ::File.basename(fname, '.*') search_me = ::File.( ::File.join(::File.dirname(fname), dir, '**', '*.rb')) Dir.glob(search_me).sort.each do |rb| require rb end end |
.version ⇒ Object
Returns the version string for the library.
26 27 28 |
# File 'lib/spacer.rb', line 26 def self.version VERSION end |