code
stringlengths
1
1.73M
language
stringclasses
1 value
module AuthenticatedSystem protected # Returns true or false if the user is logged in. # Preloads @current_user with the user model if they're logged in. def logged_in? !!current_user end # Accesses the current user from the session. # Future calls avoid the database because nil is not...
Ruby
module AuthenticatedTestHelper # Sets the current user in the session from the user fixtures. def login_as(user) @request.session[:user_id] = user ? users(user).id : nil end def authorize_as(user) @request.env["HTTP_AUTHORIZATION"] = user ? ActionController::HttpAuthentication::Basic.encode_credentials...
Ruby
class FacebookerPublisher < Facebooker::Rails::Publisher # def profile_for_user(user_to_update) # send_as :profile # from user_to_update # recipients user_to_update # fbml = render(:partial =>"/facebook/user_profile.fbml.erb") # profile(fbml) # action = render(:partial => "/facebo...
Ruby
#!/usr/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
Ruby
#!/usr/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
Ruby
#!/usr/local/bin/ruby # # You may specify the path to the FastCGI crash log (a log of unhandled # exceptions which forced the FastCGI instance to exit, great for debugging) # and the number of requests to process before running garbage collection. # # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.lo...
Ruby
#!/usr/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
Ruby
#!/usr/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
Ruby
#!/usr/local/bin/ruby # # You may specify the path to the FastCGI crash log (a log of unhandled # exceptions which forced the FastCGI instance to exit, great for debugging) # and the number of requests to process before running garbage collection. # # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.lo...
Ruby
require File.dirname(__FILE__) + '/../test_helper' require 'stories_controller' # Re-raise errors caught by the controller. class StoriesController; def rescue_action(e) raise e end; end class StoriesControllerTest < Test::Unit::TestCase def setup @controller = StoriesController.new @request = ActionCont...
Ruby
Factory.sequence :email do |n| "person#{n}@example.com" end Factory.sequence :password do |n| "Sup3r#{n}" end Factory.define :user do |u| u.password { Factory.next :email } u.password_confirmation {|p| p.password } u.login "JDough" u.email { Factory.next :email } end # DEFINITION EXAMPLES # This will g...
Ruby
ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'test_help' require 'mocha' require 'factory_girl' require File.expand_path(File.dirname(__FILE__) + "/factories") class Test::Unit::TestCase # Transactional fixtures accelerate your tests by wrapping each...
Ruby
#!/usr/bin/env ruby # # == Synopsis # An interactive command-line interface to the Google Calculator. # # == License # Copyright (C) 2009 Chris Biagini <firstname DOT lastname AT gmail DOT com>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
Ruby
#!/usr/bin/env ruby # # == Synopsis # An interactive command-line interface to the Google Calculator. # # == License # Copyright (C) 2009 Chris Biagini <firstname DOT lastname AT gmail DOT com>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
Ruby
require 'sinatra/activerecord/rake' require './main'
Ruby
source :gemcutter gem 'sinatra', :require => 'sinatra/base' gem 'thin', '~> 1.3' gem 'pg' gem 'sinatra-activerecord' gem 'google-api-client', '>= 0.4.4', :require => 'google/api_client' group :development do gem 'rake' gem 'sqlite3-ruby' end
Ruby
class CreateUsers < ActiveRecord::Migration def up create_table :users do |t| t.string :profile_id t.string :email t.string :refresh_token end add_index :users, :profile_id end def down drop_table :users end end
Ruby
# Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Ruby
require 'sinatra.rb' # Sinatra defines #set at the top level as a way to set application configuration set :run, false set :env, (ENV['RACK_ENV'] ? ENV['RACK_ENV'].to_sym : :development) require './main' run Sinatra::Application
Ruby
require 'rubygems' require 'yaml' require 'erb' def absolute_path(path, relative_to_rakefile=true) relative_to_rakefile ? File.expand_path(path, File.dirname(__FILE__)) : File.expand_path(path) end def is_win if(RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|cygwin|bccwin/) return true else return fal...
Ruby
require 'tartan'
Ruby
require 'parser/ast' module Parser class Parser include Base attr_reader :app def initialize(tokenizer, filename = "") @tokenizer = tokenizer @filename = filename @root = nil @current = nil @app = false end def parse @indent = @tokenizer.next_token @lo...
Ruby
require 'parser.rb' module Parser class Tokenizer include Parser::Base def initialize(f) @f = f @q = [] @linum = 0 self.tokenize end def next_token @q.shift end def tokenize while !@f.eof new_line @q.push Token.new(:INDENT, count_indent(@...
Ruby
module Parser module Base def count_indent(line) l = line.gsub(/\t/, " " * TAB_SIZE) count = 0 count += 1 while line[count] == " " count end def print_ast(decl) puts decl decl.children.each{|c| print_ast c} end end end
Ruby
TAB_SIZE = 4 ASSIGNMENT = ":" STATE_SEPARATOR = "," CASE_DECL = "case" PRIMARY_STATE_DECL = "union" L_PLAID_LITERAL = "{" R_PLAID_LITERAL = "}"
Ruby
module Parser module AST class CaseDecl attr_accessor :linum, :id, :indent_level, :literal, :and_states, :parent_node, :children def initialize(linum, indent_level, id, literal = nil, and_states = []) @linum = linum @id = id @indent_level = indent_level @literal = liter...
Ruby
module Parser module AST class Decl attr_accessor :linum, :id, :indent_level, :parent_node, :children, :and_states attr_reader :primary_state def initialize(linum, indent_level, id, and_states, primary_state) @linum = linum @id = id @indent_level = indent_level @a...
Ruby
module Parser module AST class StateDef attr_accessor :linum, :id, :literal, :and_states, :children, :parent def initialize(linum, id, literal=nil, and_states=[], parent = nil) @linum = linum @id = id @literal = literal @and_states = and_states @parent = parent...
Ruby
module Parser module AST class AST attr_reader :root, :app def initialize(root, app) @root = root @app = app end end end end
Ruby
require 'parser/ast/ast' require 'parser/ast/state_def' require 'parser/ast/decl' require 'parser/ast/case_decl'
Ruby
require 'codegenerator/plaid/structure' require 'codegenerator/plaid/style' module Codegenerator module Plaid def and_states?(node) node.and_states.size > 0 end def and_states_literal(node, prefix = "", suffix = "") return "" unless and_states?(node) prefix + node.and_states.map{|s|s.t...
Ruby
module Codegenerator module Plaid class Structure include Codegenerator::Plaid def initialize(ast) @root = ast.root @app = ast.app @case_containing = [] @output = {} end def generate(output_dir) generate_state_decl generate_case_states ...
Ruby
module Codegenerator module Plaid class Style include Codegenerator::Plaid def initialize(ast) @root = ast.root @output = {} end def generate(output_dir) @current = setup_current(@root) @root.accept(self) generate_source_files(output_dir) en...
Ruby
require 'parser/const' require 'parser/base' require 'parser/tokenizer' require 'parser/parser'
Ruby
require 'codegenerator/plaid'
Ruby
require 'parser' require 'codegenerator'
Ruby
Name: e1000 Summary: Intel(R) PRO/1000 driver for Linux Version: 7.3.20 Release: 1 Source: %{name}-%{version}.tar.gz Vendor: Intel Corporation License: GPL ExclusiveOS: linux Group: System Environment/Kernel Provides: %{name} URL: http://support.intel.com/support/go/linux/e1000.htm BuildRoot: %{_tmppath}/%{name}-%{vers...
Ruby
Name: e1000 Summary: Intel(R) PRO/1000 driver for Linux Version: 7.3.20 Release: 1 Source: %{name}-%{version}.tar.gz Vendor: Intel Corporation License: GPL ExclusiveOS: linux Group: System Environment/Kernel Provides: %{name} URL: http://support.intel.com/support/go/linux/e1000.htm BuildRoot: %{_tmppath}/%{name}-%{vers...
Ruby
# $ext_path: This should be the path of where the ExtJS SDK is installed # Generally this will be in a lib/extjs folder in your applications root # <root>/lib/extjs $ext_path = "../../" # sass_path: the directory your Sass files are in. THIS file should also be in the Sass folder # Generally this will be in a resource...
Ruby
# include the utils rb file which has extra functionality for the ext theme dir = File.dirname(__FILE__) require File.join(dir, 'lib', 'utils.rb') # register ext4 as a compass framework Compass::Frameworks.register 'ext4', dir
Ruby
# $ext_path: This should be the path of the Ext JS SDK relative to this file $ext_path = "../../extjs" # sass_path: the directory your Sass files are in. THIS file should also be in the Sass folder # Generally this will be in a resources/sass folder # <root>/resources/sass sass_path = File.dirname(__FILE__) # css_pat...
Ruby
module ExtJS4 module SassExtensions module Functions module Utils def parsebox(list, n) assert_type n, :Number if !n.int? raise ArgumentError.new("List index #{n} must be an integer") elsif n.to_i < 1 raise ArgumentError.new("List index #{n} must...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' dir_config("hdf","../../..","../../../libs") if have_header("util/neo_hdf.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' dir_config("hdf","../../..","../../../libs") if have_header("util/neo_hdf.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") have_library("z", "deflate") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") && have_library("neo_cgi","cgi_register_strfuncs") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'neo' h=Neo::Hdf.new h.set_value "1","farming" h.set_value "2","sewing" h.set_value "3","bowling" h.set_value "party.1","baloons" h.set_value "party.2","noise makers" h.set_value "party.3","telling long\nstories" h.set_attr "party.1", "Drool", "True" h.set_attr "party.2", "Pink", "1" pr...
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") create_makefile("hdf") end
Ruby
#!/usr/bin/env ruby require 'mkmf' # dir_config("hdf","../../..","../../../libs") dir_config("hdf") if have_header("ClearSilver.h") && have_library("neo_utl","hdf_init") && have_library("neo_cs","cs_init") create_makefile("hdf") end
Ruby
# # This file is automatically generated. DO NOT MODIFY! # # install.rb # # Copyright (c) 2000-2002 Minero Aoki <aamine@loveruby.net> # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2. # ### begin compat.rb unless E...
Ruby
require 'hdf' module Clearsilver class Hdf < Neo::Hdf def initialize super @level=0 @cpos="" @position=[] end attr_reader :position, :cpos def push name @position.push(@cpos) @cpos+=name+"." if block_given? yield @cpos=@position.pop end e...
Ruby