This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
website :open_source_publishing do |prototype| | |
agents :users, :groups, :admins, :superusers | |
default_agent :non_user | |
root :index do |site_map| | |
# make a forum at /forum | |
plugin :forum, 'forum' | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AClass | |
def method | |
puts 'do stuff' | |
end | |
alias_method new_method_name, method | |
def method | |
puts 'do stuff first' | |
new_method_name | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
class: Color | |
type: enum | |
description: Encapsulates an abstract color. Contains a large list | |
of different colors which can be accessed like: | |
Color.Russet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define RI_Init( descriptor_name, passed_argc, passed_args, passed_rb_self ) rarg_parse_descriptor_t descriptor_name; \ | |
descriptor_name.argc = passed_argc; \ | |
descriptor_name.args = passed_args; \ | |
descriptor_name.args_parsed = 0; \ | |
descriptor_name.rb_self = passed_rb_self; | |
#define RI_Define( parameter_sets_name, \ | |
descriptor_name, \ | |
passed_argc, \ | |
passed_args, \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
R_DefineAndParse( argc, args, rb_primary_database_self, | |
//----------------------------------------------// | |
R_DescribeParameterSet( | |
// :index | |
R_ParameterSet( R_Parameter( R_MatchSymbol( rb_index ) ), | |
// [ <secondary_database> ] | |
R_OptionalParameter( R_MatchAncestorInstance( rb_secondary_database, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************* | |
* RARG_parse_PossibleTypeMatch * | |
*********************************/ | |
DESCRIBE( RARG_parse_PossibleTypeMatch, "RARG_parse_PossibleTypeMatch( rarg_parse_descriptor_t* parse_descriptor, rarg_possible_match_t* possible_match, VALUE rb_arg )" ) | |
IT( "tests whether current arg is a given underying type (R_<type> which correspond in name to Ruby's T_<type>, always in caps)" ) | |
// should succeed | |
rarg_parse_descriptor_t* parse_descriptor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.6) | |
project( rargs C ) | |
# add local modules path for project | |
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/" ) | |
# where to look for source files (headers and source) | |
include_directories( rargs/include ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set( _RUBY_DEBUG_OUTPUT ON) | |
# make sure we have libdb | |
find_package( Ruby REQUIRED ) | |
message( STATUS "Using Ruby Lib: ${RUBY_LIBRARY}" ) | |
message( STATUS "Using Ruby Headers: ${RUBY_INCLUDE_DIRS}" ) | |
get_directory_property( cmake_current_include_dir INCLUDE_DIRECTORIES ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'workflow/WorkflowController.rb' | |
require 'workflow/WorkflowObject.rb' | |
class Workflow < WorkflowObject | |
# everything inherits from this | |
class Object | |
end | |
# Consultants are agents of the Workflow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How does work? | |
# at top-level: | |
Hello #=> :hello | |
class Friend | |
puts Hello | |
end | |
#=> NameError: uninitialized constant Friend::Hello |