id
int32
0
24.9k
repo
stringlengths
5
58
path
stringlengths
9
168
func_name
stringlengths
9
130
original_string
stringlengths
66
10.5k
language
stringclasses
1 value
code
stringlengths
66
10.5k
code_tokens
list
docstring
stringlengths
8
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
94
266
19,000
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.after_initialize
def after_initialize @comments ||= {} @associations = {} @definitions = initial_definitions @constant_loader = ConstantLoader.new(:definitions => @definitions) @scopes = [@definitions] @value_stack = NestedStack.new @variable_stack = NestedStack.new ...
ruby
def after_initialize @comments ||= {} @associations = {} @definitions = initial_definitions @constant_loader = ConstantLoader.new(:definitions => @definitions) @scopes = [@definitions] @value_stack = NestedStack.new @variable_stack = NestedStack.new ...
[ "def", "after_initialize", "@comments", "||=", "{", "}", "@associations", "=", "{", "}", "@definitions", "=", "initial_definitions", "@constant_loader", "=", "ConstantLoader", ".", "new", "(", ":definitions", "=>", "@definitions", ")", "@scopes", "=", "[", "@defin...
Called after a new instance of the virtual machine has been created.
[ "Called", "after", "a", "new", "instance", "of", "the", "virtual", "machine", "has", "been", "created", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L165-L181
19,001
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.run
def run(ast) ast = [ast] unless ast.is_a?(Array) # pre-load all the built-in definitions. @constant_loader.run(ast) ast.each { |node| iterate(node) } freeze end
ruby
def run(ast) ast = [ast] unless ast.is_a?(Array) # pre-load all the built-in definitions. @constant_loader.run(ast) ast.each { |node| iterate(node) } freeze end
[ "def", "run", "(", "ast", ")", "ast", "=", "[", "ast", "]", "unless", "ast", ".", "is_a?", "(", "Array", ")", "# pre-load all the built-in definitions.", "@constant_loader", ".", "run", "(", "ast", ")", "ast", ".", "each", "{", "|", "node", "|", "iterate...
Processes the given AST or a collection of AST nodes. @see #iterate @param [Array|RubyLint::AST::Node] ast
[ "Processes", "the", "given", "AST", "or", "a", "collection", "of", "AST", "nodes", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L189-L198
19,002
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.after_or_asgn
def after_or_asgn variable = variable_stack.pop.first value = value_stack.pop.first if variable and value conditional_assignment(variable, value, false) end end
ruby
def after_or_asgn variable = variable_stack.pop.first value = value_stack.pop.first if variable and value conditional_assignment(variable, value, false) end end
[ "def", "after_or_asgn", "variable", "=", "variable_stack", ".", "pop", ".", "first", "value", "=", "value_stack", ".", "pop", ".", "first", "if", "variable", "and", "value", "conditional_assignment", "(", "variable", ",", "value", ",", "false", ")", "end", "...
Processes an `or` assignment in the form of `variable ||= value`.
[ "Processes", "an", "or", "assignment", "in", "the", "form", "of", "variable", "||", "=", "value", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L311-L318
19,003
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.after_and_asgn
def after_and_asgn variable = variable_stack.pop.first value = value_stack.pop.first conditional_assignment(variable, value) end
ruby
def after_and_asgn variable = variable_stack.pop.first value = value_stack.pop.first conditional_assignment(variable, value) end
[ "def", "after_and_asgn", "variable", "=", "variable_stack", ".", "pop", ".", "first", "value", "=", "value_stack", ".", "pop", ".", "first", "conditional_assignment", "(", "variable", ",", "value", ")", "end" ]
Processes an `and` assignment in the form of `variable &&= value`.
[ "Processes", "an", "and", "assignment", "in", "the", "form", "of", "variable", "&&", "=", "value", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L327-L332
19,004
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.after_array
def after_array(node) builder = DefinitionBuilder::RubyArray.new( node, self, :values => value_stack.pop ) push_value(builder.build) end
ruby
def after_array(node) builder = DefinitionBuilder::RubyArray.new( node, self, :values => value_stack.pop ) push_value(builder.build) end
[ "def", "after_array", "(", "node", ")", "builder", "=", "DefinitionBuilder", "::", "RubyArray", ".", "new", "(", "node", ",", "self", ",", ":values", "=>", "value_stack", ".", "pop", ")", "push_value", "(", "builder", ".", "build", ")", "end" ]
Builds an Array. @param [RubyLint::AST::Node] node
[ "Builds", "an", "Array", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L387-L395
19,005
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.after_hash
def after_hash(node) builder = DefinitionBuilder::RubyHash.new( node, self, :values => value_stack.pop ) push_value(builder.build) end
ruby
def after_hash(node) builder = DefinitionBuilder::RubyHash.new( node, self, :values => value_stack.pop ) push_value(builder.build) end
[ "def", "after_hash", "(", "node", ")", "builder", "=", "DefinitionBuilder", "::", "RubyHash", ".", "new", "(", "node", ",", "self", ",", ":values", "=>", "value_stack", ".", "pop", ")", "push_value", "(", "builder", ".", "build", ")", "end" ]
Builds a Hash. @param [RubyLint::AST::Node] node
[ "Builds", "a", "Hash", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L409-L417
19,006
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.on_self
def on_self scope = current_scope method = scope.lookup(scope.method_call_type, 'self') push_value(method.return_value) end
ruby
def on_self scope = current_scope method = scope.lookup(scope.method_call_type, 'self') push_value(method.return_value) end
[ "def", "on_self", "scope", "=", "current_scope", "method", "=", "scope", ".", "lookup", "(", "scope", ".", "method_call_type", ",", "'self'", ")", "push_value", "(", "method", ".", "return_value", ")", "end" ]
Pushes the value of `self` onto the current stack.
[ "Pushes", "the", "value", "of", "self", "onto", "the", "current", "stack", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L446-L451
19,007
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.on_class
def on_class(node) parent = nil parent_node = node.children[1] if parent_node parent = evaluate_node(parent_node) if !parent or !parent.const? # FIXME: this should use `definitions` instead. parent = current_scope.lookup(:const, 'Object') end en...
ruby
def on_class(node) parent = nil parent_node = node.children[1] if parent_node parent = evaluate_node(parent_node) if !parent or !parent.const? # FIXME: this should use `definitions` instead. parent = current_scope.lookup(:const, 'Object') end en...
[ "def", "on_class", "(", "node", ")", "parent", "=", "nil", "parent_node", "=", "node", ".", "children", "[", "1", "]", "if", "parent_node", "parent", "=", "evaluate_node", "(", "parent_node", ")", "if", "!", "parent", "or", "!", "parent", ".", "const?", ...
Creates the definition for a class. @param [RubyLint::AST::Node] node
[ "Creates", "the", "definition", "for", "a", "class", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L481-L495
19,008
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.on_block
def on_block(node) builder = DefinitionBuilder::RubyBlock.new(node, self) definition = builder.build associate_node(node, definition) push_scope(definition) end
ruby
def on_block(node) builder = DefinitionBuilder::RubyBlock.new(node, self) definition = builder.build associate_node(node, definition) push_scope(definition) end
[ "def", "on_block", "(", "node", ")", "builder", "=", "DefinitionBuilder", "::", "RubyBlock", ".", "new", "(", "node", ",", "self", ")", "definition", "=", "builder", ".", "build", "associate_node", "(", "node", ",", "definition", ")", "push_scope", "(", "d...
Builds the definition for a block. @param [RubyLint::AST::Node] node
[ "Builds", "the", "definition", "for", "a", "block", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L509-L516
19,009
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.on_def
def on_def(node) receiver = nil if node.type == :defs receiver = evaluate_node(node.children[0]) end builder = DefinitionBuilder::RubyMethod.new( node, self, :type => @method_type, :receiver => receiver, :visibility => @visibility )...
ruby
def on_def(node) receiver = nil if node.type == :defs receiver = evaluate_node(node.children[0]) end builder = DefinitionBuilder::RubyMethod.new( node, self, :type => @method_type, :receiver => receiver, :visibility => @visibility )...
[ "def", "on_def", "(", "node", ")", "receiver", "=", "nil", "if", "node", ".", "type", "==", ":defs", "receiver", "=", "evaluate_node", "(", "node", ".", "children", "[", "0", "]", ")", "end", "builder", "=", "DefinitionBuilder", "::", "RubyMethod", ".", ...
Creates the definition for a method definition. @param [RubyLint::AST::Node] node
[ "Creates", "the", "definition", "for", "a", "method", "definition", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L558-L589
19,010
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.after_def
def after_def previous = pop_scope current = current_scope reset_docstring_tags EXPORT_VARIABLES.each do |type| current.copy(previous, type) end end
ruby
def after_def previous = pop_scope current = current_scope reset_docstring_tags EXPORT_VARIABLES.each do |type| current.copy(previous, type) end end
[ "def", "after_def", "previous", "=", "pop_scope", "current", "=", "current_scope", "reset_docstring_tags", "EXPORT_VARIABLES", ".", "each", "do", "|", "type", "|", "current", ".", "copy", "(", "previous", ",", "type", ")", "end", "end" ]
Exports various variables to the outer scope of the method definition.
[ "Exports", "various", "variables", "to", "the", "outer", "scope", "of", "the", "method", "definition", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L594-L603
19,011
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.on_send
def on_send(node) name = node.children[1].to_s name = SEND_MAPPING.fetch(name, name) callback = "on_send_#{name}" value_stack.add_stack execute_callback(callback, node) end
ruby
def on_send(node) name = node.children[1].to_s name = SEND_MAPPING.fetch(name, name) callback = "on_send_#{name}" value_stack.add_stack execute_callback(callback, node) end
[ "def", "on_send", "(", "node", ")", "name", "=", "node", ".", "children", "[", "1", "]", ".", "to_s", "name", "=", "SEND_MAPPING", ".", "fetch", "(", "name", ",", "name", ")", "callback", "=", "\"on_send_#{name}\"", "value_stack", ".", "add_stack", "exec...
Processes a method call. If a certain method call has its own dedicated callback that one will be called as well. @param [RubyLint::AST::Node] node
[ "Processes", "a", "method", "call", ".", "If", "a", "certain", "method", "call", "has", "its", "own", "dedicated", "callback", "that", "one", "will", "be", "called", "as", "well", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L640-L648
19,012
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.initial_definitions
def initial_definitions definitions = Definition::RubyObject.new( :name => 'root', :type => :root, :instance_type => :instance, :inherit_self => false ) definitions.parents = [ definitions.constant_proxy('Object', RubyLint.registry) ] ...
ruby
def initial_definitions definitions = Definition::RubyObject.new( :name => 'root', :type => :root, :instance_type => :instance, :inherit_self => false ) definitions.parents = [ definitions.constant_proxy('Object', RubyLint.registry) ] ...
[ "def", "initial_definitions", "definitions", "=", "Definition", "::", "RubyObject", ".", "new", "(", ":name", "=>", "'root'", ",", ":type", "=>", ":root", ",", ":instance_type", "=>", ":instance", ",", ":inherit_self", "=>", "false", ")", "definitions", ".", "...
Returns the initial set of definitions to use. @return [RubyLint::Definition::RubyObject]
[ "Returns", "the", "initial", "set", "of", "definitions", "to", "use", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L810-L825
19,013
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.push_scope
def push_scope(definition) unless definition.is_a?(RubyLint::Definition::RubyObject) raise( ArgumentError, "Expected a RubyLint::Definition::RubyObject but got " \ "#{definition.class} instead" ) end @scopes << definition end
ruby
def push_scope(definition) unless definition.is_a?(RubyLint::Definition::RubyObject) raise( ArgumentError, "Expected a RubyLint::Definition::RubyObject but got " \ "#{definition.class} instead" ) end @scopes << definition end
[ "def", "push_scope", "(", "definition", ")", "unless", "definition", ".", "is_a?", "(", "RubyLint", "::", "Definition", "::", "RubyObject", ")", "raise", "(", "ArgumentError", ",", "\"Expected a RubyLint::Definition::RubyObject but got \"", "\"#{definition.class} instead\""...
Pushes a new scope on the list of available scopes. @param [RubyLint::Definition::RubyObject] definition
[ "Pushes", "a", "new", "scope", "on", "the", "list", "of", "available", "scopes", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L870-L880
19,014
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.push_variable_value
def push_variable_value(node) return if value_stack.empty? || @ignored_nodes.include?(node) definition = definition_for_node(node) if definition value = definition.value ? definition.value : definition push_value(value) end end
ruby
def push_variable_value(node) return if value_stack.empty? || @ignored_nodes.include?(node) definition = definition_for_node(node) if definition value = definition.value ? definition.value : definition push_value(value) end end
[ "def", "push_variable_value", "(", "node", ")", "return", "if", "value_stack", ".", "empty?", "||", "@ignored_nodes", ".", "include?", "(", "node", ")", "definition", "=", "definition_for_node", "(", "node", ")", "if", "definition", "value", "=", "definition", ...
Pushes the value of a variable onto the value stack. @param [RubyLint::AST::Node] node
[ "Pushes", "the", "value", "of", "a", "variable", "onto", "the", "value", "stack", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L896-L906
19,015
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.assign_variable
def assign_variable(type, name, value, node) scope = assignment_scope(type) variable = scope.lookup(type, name) # If there's already a variable we'll just update it. if variable variable.reference_amount += 1 # `value` is not for conditional assignments as those are handled ...
ruby
def assign_variable(type, name, value, node) scope = assignment_scope(type) variable = scope.lookup(type, name) # If there's already a variable we'll just update it. if variable variable.reference_amount += 1 # `value` is not for conditional assignments as those are handled ...
[ "def", "assign_variable", "(", "type", ",", "name", ",", "value", ",", "node", ")", "scope", "=", "assignment_scope", "(", "type", ")", "variable", "=", "scope", ".", "lookup", "(", "type", ",", "name", ")", "# If there's already a variable we'll just update it....
Assigns a basic variable. @param [Symbol] type The type of variable. @param [String] name The name of the variable @param [RubyLint::Definition::RubyObject] value @param [RubyLint::AST::Node] node
[ "Assigns", "a", "basic", "variable", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L940-L973
19,016
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.add_variable
def add_variable(variable, scope = current_scope) if variable_stack.empty? scope.add(variable.type, variable.name, variable) else variable_stack.push(variable) end end
ruby
def add_variable(variable, scope = current_scope) if variable_stack.empty? scope.add(variable.type, variable.name, variable) else variable_stack.push(variable) end end
[ "def", "add_variable", "(", "variable", ",", "scope", "=", "current_scope", ")", "if", "variable_stack", ".", "empty?", "scope", ".", "add", "(", "variable", ".", "type", ",", "variable", ".", "name", ",", "variable", ")", "else", "variable_stack", ".", "p...
Adds a variable to the current scope of, if a the variable stack is not empty, add it to the stack instead. @param [RubyLint::Definition::RubyObject] variable @param [RubyLint::Definition::RubyObject] scope
[ "Adds", "a", "variable", "to", "the", "current", "scope", "of", "if", "a", "the", "variable", "stack", "is", "not", "empty", "add", "it", "to", "the", "stack", "instead", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L992-L998
19,017
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.create_primitive
def create_primitive(node, options = {}) builder = DefinitionBuilder::Primitive.new(node, self, options) return builder.build end
ruby
def create_primitive(node, options = {}) builder = DefinitionBuilder::Primitive.new(node, self, options) return builder.build end
[ "def", "create_primitive", "(", "node", ",", "options", "=", "{", "}", ")", "builder", "=", "DefinitionBuilder", "::", "Primitive", ".", "new", "(", "node", ",", "self", ",", "options", ")", "return", "builder", ".", "build", "end" ]
Creates a primitive value such as an integer. @param [RubyLint::AST::Node] node @param [Hash] options
[ "Creates", "a", "primitive", "value", "such", "as", "an", "integer", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1006-L1010
19,018
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.conditional_assignment
def conditional_assignment(variable, value, bool = true) variable.reference_amount += 1 if current_scope.has_definition?(variable.type, variable.name) == bool variable.value = value current_scope.add_definition(variable) buffer_assignment_value(variable.value) end end
ruby
def conditional_assignment(variable, value, bool = true) variable.reference_amount += 1 if current_scope.has_definition?(variable.type, variable.name) == bool variable.value = value current_scope.add_definition(variable) buffer_assignment_value(variable.value) end end
[ "def", "conditional_assignment", "(", "variable", ",", "value", ",", "bool", "=", "true", ")", "variable", ".", "reference_amount", "+=", "1", "if", "current_scope", ".", "has_definition?", "(", "variable", ".", "type", ",", "variable", ".", "name", ")", "==...
Performs a conditional assignment. @param [RubyLint::Definition::RubyObject] variable @param [RubyLint::Definition::RubyValue] value @param [TrueClass|FalseClass] bool When set to `true` existing variables will be overwritten.
[ "Performs", "a", "conditional", "assignment", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1050-L1060
19,019
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.definition_for_node
def definition_for_node(node) if node.const? and node.children[0] definition = ConstantPath.new(node).resolve(current_scope) else definition = current_scope.lookup(node.type, node.name) end definition = Definition::RubyObject.create_unknown unless definition return defini...
ruby
def definition_for_node(node) if node.const? and node.children[0] definition = ConstantPath.new(node).resolve(current_scope) else definition = current_scope.lookup(node.type, node.name) end definition = Definition::RubyObject.create_unknown unless definition return defini...
[ "def", "definition_for_node", "(", "node", ")", "if", "node", ".", "const?", "and", "node", ".", "children", "[", "0", "]", "definition", "=", "ConstantPath", ".", "new", "(", "node", ")", ".", "resolve", "(", "current_scope", ")", "else", "definition", ...
Returns the definition for the given node. @param [RubyLint::AST::Node] node @return [RubyLint::Definition::RubyObject]
[ "Returns", "the", "definition", "for", "the", "given", "node", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1068-L1078
19,020
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.increment_reference_amount
def increment_reference_amount(node) definition = definition_for_node(node) if definition and !definition.frozen? definition.reference_amount += 1 end end
ruby
def increment_reference_amount(node) definition = definition_for_node(node) if definition and !definition.frozen? definition.reference_amount += 1 end end
[ "def", "increment_reference_amount", "(", "node", ")", "definition", "=", "definition_for_node", "(", "node", ")", "if", "definition", "and", "!", "definition", ".", "frozen?", "definition", ".", "reference_amount", "+=", "1", "end", "end" ]
Increments the reference amount of a node's definition unless the definition is frozen. @param [RubyLint::AST::Node] node
[ "Increments", "the", "reference", "amount", "of", "a", "node", "s", "definition", "unless", "the", "definition", "is", "frozen", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1086-L1092
19,021
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.inherit_definition
def inherit_definition(definition, inherit) unless definition.parents.include?(inherit) definition.parents << inherit end end
ruby
def inherit_definition(definition, inherit) unless definition.parents.include?(inherit) definition.parents << inherit end end
[ "def", "inherit_definition", "(", "definition", ",", "inherit", ")", "unless", "definition", ".", "parents", ".", "include?", "(", "inherit", ")", "definition", ".", "parents", "<<", "inherit", "end", "end" ]
Includes the definition `inherit` in the list of parent definitions of `definition`. @param [RubyLint::Definition::RubyObject] definition @param [RubyLint::Definition::RubyObject] inherit
[ "Includes", "the", "definition", "inherit", "in", "the", "list", "of", "parent", "definitions", "of", "definition", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1101-L1105
19,022
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.buffer_docstring_tags
def buffer_docstring_tags(node) return unless comments[node] parser = Docstring::Parser.new tags = parser.parse(comments[node].map(&:text)) @docstring_tags = Docstring::Mapping.new(tags) end
ruby
def buffer_docstring_tags(node) return unless comments[node] parser = Docstring::Parser.new tags = parser.parse(comments[node].map(&:text)) @docstring_tags = Docstring::Mapping.new(tags) end
[ "def", "buffer_docstring_tags", "(", "node", ")", "return", "unless", "comments", "[", "node", "]", "parser", "=", "Docstring", "::", "Parser", ".", "new", "tags", "=", "parser", ".", "parse", "(", "comments", "[", "node", "]", ".", "map", "(", ":text", ...
Extracts all the docstring tags from the documentation of the given node, retrieves the corresponding types and stores them for later use. @param [RubyLint::AST::Node] node
[ "Extracts", "all", "the", "docstring", "tags", "from", "the", "documentation", "of", "the", "given", "node", "retrieves", "the", "corresponding", "types", "and", "stores", "them", "for", "later", "use", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1113-L1120
19,023
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.create_unknown_with_method
def create_unknown_with_method(name) definition = Definition::RubyObject.create_unknown definition.send("define_#{@method_type}", name) return definition end
ruby
def create_unknown_with_method(name) definition = Definition::RubyObject.create_unknown definition.send("define_#{@method_type}", name) return definition end
[ "def", "create_unknown_with_method", "(", "name", ")", "definition", "=", "Definition", "::", "RubyObject", ".", "create_unknown", "definition", ".", "send", "(", "\"define_#{@method_type}\"", ",", "name", ")", "return", "definition", "end" ]
Creates an "unknown" definition with the given method in it. @param [String] name The name of the method to add. @return [RubyLint::Definition::RubyObject]
[ "Creates", "an", "unknown", "definition", "with", "the", "given", "method", "in", "it", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1148-L1154
19,024
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.definitions_for_types
def definitions_for_types(types) definitions = [] # There are basically two type signatures: either the name(s) of a # constant or a method in the form of `#method_name`. types.each do |type| if type[0] == '#' found = create_unknown_with_method(type[1..-1]) else ...
ruby
def definitions_for_types(types) definitions = [] # There are basically two type signatures: either the name(s) of a # constant or a method in the form of `#method_name`. types.each do |type| if type[0] == '#' found = create_unknown_with_method(type[1..-1]) else ...
[ "def", "definitions_for_types", "(", "types", ")", "definitions", "=", "[", "]", "# There are basically two type signatures: either the name(s) of a", "# constant or a method in the form of `#method_name`.", "types", ".", "each", "do", "|", "type", "|", "if", "type", "[", "...
Returns a collection of definitions for a set of YARD types. @param [Array] types @return [Array]
[ "Returns", "a", "collection", "of", "definitions", "for", "a", "set", "of", "YARD", "types", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1162-L1178
19,025
YorickPeterse/ruby-lint
lib/ruby-lint/virtual_machine.rb
RubyLint.VirtualMachine.track_method_call
def track_method_call(definition, name, node) method = definition.lookup(definition.method_call_type, name) current = current_scope location = { :line => node.line, :column => node.column, :file => node.file } # Add the call to the current scope if we're dea...
ruby
def track_method_call(definition, name, node) method = definition.lookup(definition.method_call_type, name) current = current_scope location = { :line => node.line, :column => node.column, :file => node.file } # Add the call to the current scope if we're dea...
[ "def", "track_method_call", "(", "definition", ",", "name", ",", "node", ")", "method", "=", "definition", ".", "lookup", "(", "definition", ".", "method_call_type", ",", "name", ")", "current", "=", "current_scope", "location", "=", "{", ":line", "=>", "nod...
Tracks a method call. @param [RubyLint::Definition::RubyMethod] definition @param [String] name @param [RubyLint::AST::Node] node
[ "Tracks", "a", "method", "call", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/virtual_machine.rb#L1211-L1234
19,026
YorickPeterse/ruby-lint
lib/ruby-lint/definition_generator.rb
RubyLint.DefinitionGenerator.group_constants
def group_constants(constants) grouped = Hash.new { |hash, key| hash[key] = [] } constants.each do |name| root = name.split('::')[0] grouped[root] << name end return grouped end
ruby
def group_constants(constants) grouped = Hash.new { |hash, key| hash[key] = [] } constants.each do |name| root = name.split('::')[0] grouped[root] << name end return grouped end
[ "def", "group_constants", "(", "constants", ")", "grouped", "=", "Hash", ".", "new", "{", "|", "hash", ",", "key", "|", "hash", "[", "key", "]", "=", "[", "]", "}", "constants", ".", "each", "do", "|", "name", "|", "root", "=", "name", ".", "spli...
Groups constants together based on the top level namespace segment. @param [Array] constants @return [Hash]
[ "Groups", "constants", "together", "based", "on", "the", "top", "level", "namespace", "segment", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/definition_generator.rb#L115-L124
19,027
YorickPeterse/ruby-lint
lib/ruby-lint/definition_generator.rb
RubyLint.DefinitionGenerator.method_information
def method_information(inspected) arg_mapping = argument_mapping info = {:method => {}, :instance_method => {}} inspected.each do |type, methods| methods.each do |method| args = [] method.parameters.each_with_index do |arg, index| name = arg[1] || "arg#...
ruby
def method_information(inspected) arg_mapping = argument_mapping info = {:method => {}, :instance_method => {}} inspected.each do |type, methods| methods.each do |method| args = [] method.parameters.each_with_index do |arg, index| name = arg[1] || "arg#...
[ "def", "method_information", "(", "inspected", ")", "arg_mapping", "=", "argument_mapping", "info", "=", "{", ":method", "=>", "{", "}", ",", ":instance_method", "=>", "{", "}", "}", "inspected", ".", "each", "do", "|", "type", ",", "methods", "|", "method...
Returns a Hash containing all the instance and class methods and their arguments. @param [Hash] inspected @return [Hash]
[ "Returns", "a", "Hash", "containing", "all", "the", "instance", "and", "class", "methods", "and", "their", "arguments", "." ]
87842ae295c2283d8e02d951781189486a7cc970
https://github.com/YorickPeterse/ruby-lint/blob/87842ae295c2283d8e02d951781189486a7cc970/lib/ruby-lint/definition_generator.rb#L151-L169
19,028
rvm/rvm-capistrano
lib/rvm/capistrano/helpers/rvm_methods.rb
Capistrano.RvmMethods.rvm_task
def rvm_task(name,&block) if fetch(:rvm_require_role,nil).nil? task name, &block else task name, :roles => fetch(:rvm_require_role), &block end end
ruby
def rvm_task(name,&block) if fetch(:rvm_require_role,nil).nil? task name, &block else task name, :roles => fetch(:rvm_require_role), &block end end
[ "def", "rvm_task", "(", "name", ",", "&", "block", ")", "if", "fetch", "(", ":rvm_require_role", ",", "nil", ")", ".", "nil?", "task", "name", ",", "block", "else", "task", "name", ",", ":roles", "=>", "fetch", "(", ":rvm_require_role", ")", ",", "bloc...
defined depending on which selector was used
[ "defined", "depending", "on", "which", "selector", "was", "used" ]
61eda4140db1d80c3cb4755ab0812752620fdf66
https://github.com/rvm/rvm-capistrano/blob/61eda4140db1d80c3cb4755ab0812752620fdf66/lib/rvm/capistrano/helpers/rvm_methods.rb#L4-L10
19,029
rvm/rvm-capistrano
lib/rvm/capistrano/helpers/rvm_methods.rb
Capistrano.RvmMethods.rvm_user_command
def rvm_user_command(options={}) return '' unless rvm_type == :mixed && options[:subject_class] rvm_user_args = rvm_user.empty? ? 'none' : rvm_user.map(&:to_s).join(' ') rvm_bin = path_to_bin_rvm({ :with_ruby => true }.merge(options)) "#{rvm_bin} rvm user #{rvm_user_args} ; " end
ruby
def rvm_user_command(options={}) return '' unless rvm_type == :mixed && options[:subject_class] rvm_user_args = rvm_user.empty? ? 'none' : rvm_user.map(&:to_s).join(' ') rvm_bin = path_to_bin_rvm({ :with_ruby => true }.merge(options)) "#{rvm_bin} rvm user #{rvm_user_args} ; " end
[ "def", "rvm_user_command", "(", "options", "=", "{", "}", ")", "return", "''", "unless", "rvm_type", "==", ":mixed", "&&", "options", "[", ":subject_class", "]", "rvm_user_args", "=", "rvm_user", ".", "empty?", "?", "'none'", ":", "rvm_user", ".", "map", "...
If we're operating on something affected by the rvm user mode, we need to make sure that the server has the right rvm user mode. This returns a shell command to prepend to an existing command in order to achieve this.
[ "If", "we", "re", "operating", "on", "something", "affected", "by", "the", "rvm", "user", "mode", "we", "need", "to", "make", "sure", "that", "the", "server", "has", "the", "right", "rvm", "user", "mode", ".", "This", "returns", "a", "shell", "command", ...
61eda4140db1d80c3cb4755ab0812752620fdf66
https://github.com/rvm/rvm-capistrano/blob/61eda4140db1d80c3cb4755ab0812752620fdf66/lib/rvm/capistrano/helpers/rvm_methods.rb#L42-L47
19,030
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.set_x_axis
def set_x_axis(params) name, encoding = encode_utf16(params[:name], params[:name_encoding]) formula = parse_series_formula(params[:name_formula]) @x_axis_name = name @x_axis_encoding = encoding @x_axis_formula = formula end
ruby
def set_x_axis(params) name, encoding = encode_utf16(params[:name], params[:name_encoding]) formula = parse_series_formula(params[:name_formula]) @x_axis_name = name @x_axis_encoding = encoding @x_axis_formula = formula end
[ "def", "set_x_axis", "(", "params", ")", "name", ",", "encoding", "=", "encode_utf16", "(", "params", "[", ":name", "]", ",", "params", "[", ":name_encoding", "]", ")", "formula", "=", "parse_series_formula", "(", "params", "[", ":name_formula", "]", ")", ...
Set the properties of the X-axis. The set_x_axis() method is used to set properties of the X axis. chart.set_x_axis(:name => 'Sample length (m)' ) The properties that can be set are: :name (optional) :name_formula (optional) * :name Set the name (title or caption) for the ax...
[ "Set", "the", "properties", "of", "the", "X", "-", "axis", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L254-L261
19,031
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.set_y_axis
def set_y_axis(params) name, encoding = encode_utf16(params[:name], params[:name_encoding]) formula = parse_series_formula(params[:name_formula]) @y_axis_name = name @y_axis_encoding = encoding @y_axis_formula = formula end
ruby
def set_y_axis(params) name, encoding = encode_utf16(params[:name], params[:name_encoding]) formula = parse_series_formula(params[:name_formula]) @y_axis_name = name @y_axis_encoding = encoding @y_axis_formula = formula end
[ "def", "set_y_axis", "(", "params", ")", "name", ",", "encoding", "=", "encode_utf16", "(", "params", "[", ":name", "]", ",", "params", "[", ":name_encoding", "]", ")", "formula", "=", "parse_series_formula", "(", "params", "[", ":name_formula", "]", ")", ...
Set the properties of the Y-axis. The set_y_axis() method is used to set properties of the Y axis. chart.set_y_axis(:name => 'Sample weight (kg)' ) The properties that can be set are: :name (optional) :name_formula (optional) * :name Set the name (title or caption) for the a...
[ "Set", "the", "properties", "of", "the", "Y", "-", "axis", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L296-L303
19,032
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.set_plotarea
def set_plotarea(params = {}) return if params.empty? area = @plotarea # Set the plotarea visibility. if params.has_key?(:visible) area[:visible] = params[:visible] return if area[:visible] == 0 end # TODO. could move this out of if statement. area[:bg_color_index] = 0x08 ...
ruby
def set_plotarea(params = {}) return if params.empty? area = @plotarea # Set the plotarea visibility. if params.has_key?(:visible) area[:visible] = params[:visible] return if area[:visible] == 0 end # TODO. could move this out of if statement. area[:bg_color_index] = 0x08 ...
[ "def", "set_plotarea", "(", "params", "=", "{", "}", ")", "return", "if", "params", ".", "empty?", "area", "=", "@plotarea", "# Set the plotarea visibility.", "if", "params", ".", "has_key?", "(", ":visible", ")", "area", "[", ":visible", "]", "=", "params",...
Set the properties of the chart plotarea.
[ "Set", "the", "properties", "of", "the", "chart", "plotarea", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L357-L402
19,033
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.close
def close # :nodoc: # Ignore any data that has been written so far since it is probably # from unwanted Worksheet method calls. @data = '' # TODO. Check for charts without a series? # Store the chart BOF. store_bof(0x0020) # Store the page header store_header # Store the page fo...
ruby
def close # :nodoc: # Ignore any data that has been written so far since it is probably # from unwanted Worksheet method calls. @data = '' # TODO. Check for charts without a series? # Store the chart BOF. store_bof(0x0020) # Store the page header store_header # Store the page fo...
[ "def", "close", "# :nodoc:", "# Ignore any data that has been written so far since it is probably", "# from unwanted Worksheet method calls.", "@data", "=", "''", "# TODO. Check for charts without a series?", "# Store the chart BOF.", "store_bof", "(", "0x0020", ")", "# Store the page he...
Create and store the Chart data structures.
[ "Create", "and", "store", "the", "Chart", "data", "structures", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L521-L582
19,034
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_window2
def store_window2 # :nodoc: record = 0x023E # Record identifier length = 0x000A # Number of bytes to follow grbit = 0x0000 # Option flags rwTop = 0x0000 # Top visible row colLeft = 0x0000 # Leftmost visible column rgbHdr = 0x0000 # Row/col heading, grid color ...
ruby
def store_window2 # :nodoc: record = 0x023E # Record identifier length = 0x000A # Number of bytes to follow grbit = 0x0000 # Option flags rwTop = 0x0000 # Top visible row colLeft = 0x0000 # Leftmost visible column rgbHdr = 0x0000 # Row/col heading, grid color ...
[ "def", "store_window2", "# :nodoc:", "record", "=", "0x023E", "# Record identifier", "length", "=", "0x000A", "# Number of bytes to follow", "grbit", "=", "0x0000", "# Option flags", "rwTop", "=", "0x0000", "# Top visible row", "colLeft", "=", "0x0000", "# Leftmost visibl...
Write BIFF record Window2. Note, this overrides the parent Worksheet record because the Chart version of the record is smaller and is used mainly to indicate if the chart tab is selected or not.
[ "Write", "BIFF", "record", "Window2", ".", "Note", "this", "overrides", "the", "parent", "Worksheet", "record", "because", "the", "Chart", "version", "of", "the", "record", "is", "smaller", "and", "is", "used", "mainly", "to", "indicate", "if", "the", "chart...
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L604-L645
19,035
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.encode_utf16
def encode_utf16(str, encoding = 0) # :nodoc: # Exit if the $string isn't defined, i.e., hasn't been set by user. return [nil, nil] if str.nil? string = str.dup # Return if encoding is set, i.e., string has been manually encoded. #return ( undef, undef ) if $string == 1; ruby_19 { string = co...
ruby
def encode_utf16(str, encoding = 0) # :nodoc: # Exit if the $string isn't defined, i.e., hasn't been set by user. return [nil, nil] if str.nil? string = str.dup # Return if encoding is set, i.e., string has been manually encoded. #return ( undef, undef ) if $string == 1; ruby_19 { string = co...
[ "def", "encode_utf16", "(", "str", ",", "encoding", "=", "0", ")", "# :nodoc:", "# Exit if the $string isn't defined, i.e., hasn't been set by user.", "return", "[", "nil", ",", "nil", "]", "if", "str", ".", "nil?", "string", "=", "str", ".", "dup", "# Return if e...
Convert UTF8 strings used in the chart to UTF16.
[ "Convert", "UTF8", "strings", "used", "in", "the", "chart", "to", "UTF16", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L692-L717
19,036
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.get_color_indices
def get_color_indices(color) # :nodoc: invalid = 0x7FFF # return from Colors#get_color when color is invalid index = Colors.new.get_color(color) index = invalid if color.respond_to?(:coerce) && (color < 8 || color > 63) if index == invalid [nil, nil] else [index, get_color_rbg(index...
ruby
def get_color_indices(color) # :nodoc: invalid = 0x7FFF # return from Colors#get_color when color is invalid index = Colors.new.get_color(color) index = invalid if color.respond_to?(:coerce) && (color < 8 || color > 63) if index == invalid [nil, nil] else [index, get_color_rbg(index...
[ "def", "get_color_indices", "(", "color", ")", "# :nodoc:", "invalid", "=", "0x7FFF", "# return from Colors#get_color when color is invalid", "index", "=", "Colors", ".", "new", ".", "get_color", "(", "color", ")", "index", "=", "invalid", "if", "color", ".", "res...
Convert the user specified colour index or string to an colour index and RGB colour number.
[ "Convert", "the", "user", "specified", "colour", "index", "or", "string", "to", "an", "colour", "index", "and", "RGB", "colour", "number", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L723-L733
19,037
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.get_line_pattern
def get_line_pattern(value) # :nodoc: value = value.downcase if value.respond_to?(:to_str) default = 0 patterns = { 0 => 5, 1 => 0, 2 => 1, 3 => 2, 4 => 3, 5 => 4, 6 => 7, ...
ruby
def get_line_pattern(value) # :nodoc: value = value.downcase if value.respond_to?(:to_str) default = 0 patterns = { 0 => 5, 1 => 0, 2 => 1, 3 => 2, 4 => 3, 5 => 4, 6 => 7, ...
[ "def", "get_line_pattern", "(", "value", ")", "# :nodoc:", "value", "=", "value", ".", "downcase", "if", "value", ".", "respond_to?", "(", ":to_str", ")", "default", "=", "0", "patterns", "=", "{", "0", "=>", "5", ",", "1", "=>", "0", ",", "2", "=>",...
Get the Excel chart index for line pattern that corresponds to the user defined value.
[ "Get", "the", "Excel", "chart", "index", "for", "line", "pattern", "that", "corresponds", "to", "the", "user", "defined", "value", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L754-L784
19,038
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.get_line_weight
def get_line_weight(value) # :nodoc: value = value.downcase if value.respond_to?(:to_str) default = 0 weights = { 1 => -1, 2 => 0, 3 => 1, 4 => 2, 'hairline' => -1, 'narrow' => 0, 'medium' => 1, 'wide' => 2, }...
ruby
def get_line_weight(value) # :nodoc: value = value.downcase if value.respond_to?(:to_str) default = 0 weights = { 1 => -1, 2 => 0, 3 => 1, 4 => 2, 'hairline' => -1, 'narrow' => 0, 'medium' => 1, 'wide' => 2, }...
[ "def", "get_line_weight", "(", "value", ")", "# :nodoc:", "value", "=", "value", ".", "downcase", "if", "value", ".", "respond_to?", "(", ":to_str", ")", "default", "=", "0", "weights", "=", "{", "1", "=>", "-", "1", ",", "2", "=>", "0", ",", "3", ...
Get the Excel chart index for line weight that corresponds to the user defined value.
[ "Get", "the", "Excel", "chart", "index", "for", "line", "weight", "that", "corresponds", "to", "the", "user", "defined", "value", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L790-L810
19,039
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_chart_stream
def store_chart_stream # :nodoc: store_chart(*@config[:chart]) store_begin # Store the chart SCL record. store_plotgrowth if @chartarea[:visible] != 0 store_chartarea_frame_stream end # Store SERIES stream for each series. index = 0 @series.each do |series| store_serie...
ruby
def store_chart_stream # :nodoc: store_chart(*@config[:chart]) store_begin # Store the chart SCL record. store_plotgrowth if @chartarea[:visible] != 0 store_chartarea_frame_stream end # Store SERIES stream for each series. index = 0 @series.each do |series| store_serie...
[ "def", "store_chart_stream", "# :nodoc:", "store_chart", "(", "@config", "[", ":chart", "]", ")", "store_begin", "# Store the chart SCL record.", "store_plotgrowth", "if", "@chartarea", "[", ":visible", "]", "!=", "0", "store_chartarea_frame_stream", "end", "# Store SERIE...
Store the CHART record and it's substreams.
[ "Store", "the", "CHART", "record", "and", "it", "s", "substreams", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L815-L858
19,040
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_series_stream
def store_series_stream(params) # :nodoc: name_type = _formula_type_from_param(2, 1, params, :name_formula) value_type = _formula_type_from_param(2, 0, params, :value_formula) category_type = _formula_type_from_param(2, 0, params, :category_formula) store_series(params[:value_count], params[:c...
ruby
def store_series_stream(params) # :nodoc: name_type = _formula_type_from_param(2, 1, params, :name_formula) value_type = _formula_type_from_param(2, 0, params, :value_formula) category_type = _formula_type_from_param(2, 0, params, :category_formula) store_series(params[:value_count], params[:c...
[ "def", "store_series_stream", "(", "params", ")", "# :nodoc:", "name_type", "=", "_formula_type_from_param", "(", "2", ",", "1", ",", "params", ",", ":name_formula", ")", "value_type", "=", "_formula_type_from_param", "(", "2", ",", "0", ",", "params", ",", ":...
Write the SERIES chart substream.
[ "Write", "the", "SERIES", "chart", "substream", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L870-L892
19,041
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_x_axis_text_stream
def store_x_axis_text_stream # :nodoc: formula = @x_axis_formula.nil? ? '' : @x_axis_formula ai_type = _formula_type(2, 1, formula) store_text(*@config[:x_axis_text]) store_begin store_pos(*@config[:x_axis_text_pos]) store_fontx(8) store_ai(0, ai_type, formula) unless @x_axis_name.n...
ruby
def store_x_axis_text_stream # :nodoc: formula = @x_axis_formula.nil? ? '' : @x_axis_formula ai_type = _formula_type(2, 1, formula) store_text(*@config[:x_axis_text]) store_begin store_pos(*@config[:x_axis_text_pos]) store_fontx(8) store_ai(0, ai_type, formula) unless @x_axis_name.n...
[ "def", "store_x_axis_text_stream", "# :nodoc:", "formula", "=", "@x_axis_formula", ".", "nil?", "?", "''", ":", "@x_axis_formula", "ai_type", "=", "_formula_type", "(", "2", ",", "1", ",", "formula", ")", "store_text", "(", "@config", "[", ":x_axis_text", "]", ...
Write the X-axis TEXT substream.
[ "Write", "the", "X", "-", "axis", "TEXT", "substream", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L925-L942
19,042
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_axisparent_stream
def store_axisparent_stream # :nodoc: store_axisparent(*@config[:axisparent]) store_begin store_pos(*@config[:axisparent_pos]) store_axis_category_stream store_axis_values_stream if !@x_axis_name.nil? || !@x_axis_formula.nil? store_x_axis_text_stream end if !@y_axis_name.nil? ...
ruby
def store_axisparent_stream # :nodoc: store_axisparent(*@config[:axisparent]) store_begin store_pos(*@config[:axisparent_pos]) store_axis_category_stream store_axis_values_stream if !@x_axis_name.nil? || !@x_axis_formula.nil? store_x_axis_text_stream end if !@y_axis_name.nil? ...
[ "def", "store_axisparent_stream", "# :nodoc:", "store_axisparent", "(", "@config", "[", ":axisparent", "]", ")", "store_begin", "store_pos", "(", "@config", "[", ":axisparent_pos", "]", ")", "store_axis_category_stream", "store_axis_values_stream", "if", "!", "@x_axis_nam...
Write the AXISPARENT chart substream.
[ "Write", "the", "AXISPARENT", "chart", "substream", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1004-L1026
19,043
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_ai
def store_ai(id, type, formula, format_index = 0) # :nodoc: formula = '' if formula == [""] record = 0x1051 # Record identifier. length = 0x0008 # Number of bytes to follow. # id # Link index. # type # Reference type. # formula ...
ruby
def store_ai(id, type, formula, format_index = 0) # :nodoc: formula = '' if formula == [""] record = 0x1051 # Record identifier. length = 0x0008 # Number of bytes to follow. # id # Link index. # type # Reference type. # formula ...
[ "def", "store_ai", "(", "id", ",", "type", ",", "formula", ",", "format_index", "=", "0", ")", "# :nodoc:", "formula", "=", "''", "if", "formula", "==", "[", "\"\"", "]", "record", "=", "0x1051", "# Record identifier.", "length", "=", "0x0008", "# Number o...
Write the AI chart BIFF record.
[ "Write", "the", "AI", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1171-L1204
19,044
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_areaformat
def store_areaformat(rgbFore, rgbBack, pattern, grbit, indexFore, indexBack) # :nodoc: record = 0x100A # Record identifier. length = 0x0010 # Number of bytes to follow. # rgbFore # Foreground RGB colour. # rgbBack # Background RGB colour. # pattern ...
ruby
def store_areaformat(rgbFore, rgbBack, pattern, grbit, indexFore, indexBack) # :nodoc: record = 0x100A # Record identifier. length = 0x0010 # Number of bytes to follow. # rgbFore # Foreground RGB colour. # rgbBack # Background RGB colour. # pattern ...
[ "def", "store_areaformat", "(", "rgbFore", ",", "rgbBack", ",", "pattern", ",", "grbit", ",", "indexFore", ",", "indexBack", ")", "# :nodoc:", "record", "=", "0x100A", "# Record identifier.", "length", "=", "0x0010", "# Number of bytes to follow.", "# rgbFore ...
Write the AREAFORMAT chart BIFF record. Contains the patterns and colours of a chart area.
[ "Write", "the", "AREAFORMAT", "chart", "BIFF", "record", ".", "Contains", "the", "patterns", "and", "colours", "of", "a", "chart", "area", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1210-L1229
19,045
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_axcext
def store_axcext # :nodoc: record = 0x1062 # Record identifier. length = 0x0012 # Number of bytes to follow. catMin = 0x0000 # Minimum category on axis. catMax = 0x0000 # Maximum category on axis. catMajor = 0x0001 # Value of major unit. unitMajor...
ruby
def store_axcext # :nodoc: record = 0x1062 # Record identifier. length = 0x0012 # Number of bytes to follow. catMin = 0x0000 # Minimum category on axis. catMax = 0x0000 # Maximum category on axis. catMajor = 0x0001 # Value of major unit. unitMajor...
[ "def", "store_axcext", "# :nodoc:", "record", "=", "0x1062", "# Record identifier.", "length", "=", "0x0012", "# Number of bytes to follow.", "catMin", "=", "0x0000", "# Minimum category on axis.", "catMax", "=", "0x0000", "# Maximum category on axis.", "catMajor", "=", "0x...
Write the AXCEXT chart BIFF record.
[ "Write", "the", "AXCEXT", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1234-L1249
19,046
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_axis
def store_axis(type) # :nodoc: record = 0x101D # Record identifier. length = 0x0012 # Number of bytes to follow. # type # Axis type. reserved1 = 0x00000000 # Reserved. reserved2 = 0x00000000 # Reserved. reserved3 = 0x00000000 # Reserved. ...
ruby
def store_axis(type) # :nodoc: record = 0x101D # Record identifier. length = 0x0012 # Number of bytes to follow. # type # Axis type. reserved1 = 0x00000000 # Reserved. reserved2 = 0x00000000 # Reserved. reserved3 = 0x00000000 # Reserved. ...
[ "def", "store_axis", "(", "type", ")", "# :nodoc:", "record", "=", "0x101D", "# Record identifier.", "length", "=", "0x0012", "# Number of bytes to follow.", "# type # Axis type.", "reserved1", "=", "0x00000000", "# Reserved.", "reserved2", "=", "0x00000...
Write the AXIS chart BIFF record to define the axis type.
[ "Write", "the", "AXIS", "chart", "BIFF", "record", "to", "define", "the", "axis", "type", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1265-L1282
19,047
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_axisparent
def store_axisparent(iax, x, y, dx, dy) # :nodoc: record = 0x1041 # Record identifier. length = 0x0012 # Number of bytes to follow. # iax # Axis index. # x # X-coord. # y # Y-coord. # dx # Length of x a...
ruby
def store_axisparent(iax, x, y, dx, dy) # :nodoc: record = 0x1041 # Record identifier. length = 0x0012 # Number of bytes to follow. # iax # Axis index. # x # X-coord. # y # Y-coord. # dx # Length of x a...
[ "def", "store_axisparent", "(", "iax", ",", "x", ",", "y", ",", "dx", ",", "dy", ")", "# :nodoc:", "record", "=", "0x1041", "# Record identifier.", "length", "=", "0x0012", "# Number of bytes to follow.", "# iax # Axis index.", "# x ...
Write the AXISPARENT chart BIFF record.
[ "Write", "the", "AXISPARENT", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1298-L1315
19,048
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_catserrange
def store_catserrange # :nodoc: record = 0x1020 # Record identifier. length = 0x0008 # Number of bytes to follow. catCross = 0x0001 # Value/category crossing. catLabel = 0x0001 # Frequency of labels. catMark = 0x0001 # Frequency of ticks. grbit = 0x0001 # Option...
ruby
def store_catserrange # :nodoc: record = 0x1020 # Record identifier. length = 0x0008 # Number of bytes to follow. catCross = 0x0001 # Value/category crossing. catLabel = 0x0001 # Frequency of labels. catMark = 0x0001 # Frequency of ticks. grbit = 0x0001 # Option...
[ "def", "store_catserrange", "# :nodoc:", "record", "=", "0x1020", "# Record identifier.", "length", "=", "0x0008", "# Number of bytes to follow.", "catCross", "=", "0x0001", "# Value/category crossing.", "catLabel", "=", "0x0001", "# Frequency of labels.", "catMark", "=", "...
Write the CATSERRANGE chart BIFF record.
[ "Write", "the", "CATSERRANGE", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1330-L1339
19,049
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_chartformat
def store_chartformat(grbit = 0) # :nodoc: record = 0x1014 # Record identifier. length = 0x0014 # Number of bytes to follow. reserved1 = 0x00000000 # Reserved. reserved2 = 0x00000000 # Reserved. reserved3 = 0x00000000 # Reserved. reserved4 = 0x00000000 # R...
ruby
def store_chartformat(grbit = 0) # :nodoc: record = 0x1014 # Record identifier. length = 0x0014 # Number of bytes to follow. reserved1 = 0x00000000 # Reserved. reserved2 = 0x00000000 # Reserved. reserved3 = 0x00000000 # Reserved. reserved4 = 0x00000000 # R...
[ "def", "store_chartformat", "(", "grbit", "=", "0", ")", "# :nodoc:", "record", "=", "0x1014", "# Record identifier.", "length", "=", "0x0014", "# Number of bytes to follow.", "reserved1", "=", "0x00000000", "# Reserved.", "reserved2", "=", "0x00000000", "# Reserved.", ...
Write the CHARTFORMAT chart BIFF record. The parent record for formatting of a chart group.
[ "Write", "the", "CHARTFORMAT", "chart", "BIFF", "record", ".", "The", "parent", "record", "for", "formatting", "of", "a", "chart", "group", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1367-L1386
19,050
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_dataformat
def store_dataformat(series_index, series_number, point_number) # :nodoc: record = 0x1006 # Record identifier. length = 0x0008 # Number of bytes to follow. # series_index # Series index. # series_number # Series number. (Same as index). # point_number ...
ruby
def store_dataformat(series_index, series_number, point_number) # :nodoc: record = 0x1006 # Record identifier. length = 0x0008 # Number of bytes to follow. # series_index # Series index. # series_number # Series number. (Same as index). # point_number ...
[ "def", "store_dataformat", "(", "series_index", ",", "series_number", ",", "point_number", ")", "# :nodoc:", "record", "=", "0x1006", "# Record identifier.", "length", "=", "0x0008", "# Number of bytes to follow.", "# series_index # Series index.", "# series_number ...
Write the DATAFORMAT chart BIFF record. This record specifies the series that the subsequent sub stream refers to.
[ "Write", "the", "DATAFORMAT", "chart", "BIFF", "record", ".", "This", "record", "specifies", "the", "series", "that", "the", "subsequent", "sub", "stream", "refers", "to", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1439-L1448
19,051
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_fbi
def store_fbi(index, height, width_basis, height_basis, scale_basis) # :nodoc: record = 0x1060 # Record identifier. length = 0x000A # Number of bytes to follow. # index # Font index. height = height * 20 # Default font height in twips. # width_basis ...
ruby
def store_fbi(index, height, width_basis, height_basis, scale_basis) # :nodoc: record = 0x1060 # Record identifier. length = 0x000A # Number of bytes to follow. # index # Font index. height = height * 20 # Default font height in twips. # width_basis ...
[ "def", "store_fbi", "(", "index", ",", "height", ",", "width_basis", ",", "height_basis", ",", "scale_basis", ")", "# :nodoc:", "record", "=", "0x1060", "# Record identifier.", "length", "=", "0x000A", "# Number of bytes to follow.", "# index # Font index...
Write the FBI chart BIFF record. Specifies the font information at the time it was applied to the chart.
[ "Write", "the", "FBI", "chart", "BIFF", "record", ".", "Specifies", "the", "font", "information", "at", "the", "time", "it", "was", "applied", "to", "the", "chart", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1487-L1497
19,052
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_frame
def store_frame(frame_type, grbit) # :nodoc: record = 0x1032 # Record identifier. length = 0x0004 # Number of bytes to follow. # frame_type # Frame type. # grbit # Option flags. store_simple(record, length, frame_type, grbit) end
ruby
def store_frame(frame_type, grbit) # :nodoc: record = 0x1032 # Record identifier. length = 0x0004 # Number of bytes to follow. # frame_type # Frame type. # grbit # Option flags. store_simple(record, length, frame_type, grbit) end
[ "def", "store_frame", "(", "frame_type", ",", "grbit", ")", "# :nodoc:", "record", "=", "0x1032", "# Record identifier.", "length", "=", "0x0004", "# Number of bytes to follow.", "# frame_type # Frame type.", "# grbit # Option flags.", "store_simple", ...
Write the FRAME chart BIFF record.
[ "Write", "the", "FRAME", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1514-L1521
19,053
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_legend
def store_legend(x, y, width, height, wType, wSpacing, grbit) # :nodoc: record = 0x1015 # Record identifier. length = 0x0014 # Number of bytes to follow. # x # X-position. # y # Y-position. # width # Width. # height # He...
ruby
def store_legend(x, y, width, height, wType, wSpacing, grbit) # :nodoc: record = 0x1015 # Record identifier. length = 0x0014 # Number of bytes to follow. # x # X-position. # y # Y-position. # width # Width. # height # He...
[ "def", "store_legend", "(", "x", ",", "y", ",", "width", ",", "height", ",", "wType", ",", "wSpacing", ",", "grbit", ")", "# :nodoc:", "record", "=", "0x1015", "# Record identifier.", "length", "=", "0x0014", "# Number of bytes to follow.", "# x ...
Write the LEGEND chart BIFF record. The Marcus Horan method.
[ "Write", "the", "LEGEND", "chart", "BIFF", "record", ".", "The", "Marcus", "Horan", "method", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1526-L1547
19,054
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_lineformat
def store_lineformat(rgb, lns, we, grbit, index) # :nodoc: record = 0x1007 # Record identifier. length = 0x000C # Number of bytes to follow. # rgb # Line RGB colour. # lns # Line pattern. # we # Line weight. # grbit # Option flags. ...
ruby
def store_lineformat(rgb, lns, we, grbit, index) # :nodoc: record = 0x1007 # Record identifier. length = 0x000C # Number of bytes to follow. # rgb # Line RGB colour. # lns # Line pattern. # we # Line weight. # grbit # Option flags. ...
[ "def", "store_lineformat", "(", "rgb", ",", "lns", ",", "we", ",", "grbit", ",", "index", ")", "# :nodoc:", "record", "=", "0x1007", "# Record identifier.", "length", "=", "0x000C", "# Number of bytes to follow.", "# rgb # Line RGB colour.", "# lns ...
Write the LINEFORMAT chart BIFF record.
[ "Write", "the", "LINEFORMAT", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1552-L1569
19,055
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_markerformat
def store_markerformat(rgbFore, rgbBack, marker, grbit, icvFore, icvBack, miSize)# :nodoc: record = 0x1009 # Record identifier. length = 0x0014 # Number of bytes to follow. # rgbFore # Foreground RGB color. # rgbBack # Background RGB color. # marker # Type...
ruby
def store_markerformat(rgbFore, rgbBack, marker, grbit, icvFore, icvBack, miSize)# :nodoc: record = 0x1009 # Record identifier. length = 0x0014 # Number of bytes to follow. # rgbFore # Foreground RGB color. # rgbBack # Background RGB color. # marker # Type...
[ "def", "store_markerformat", "(", "rgbFore", ",", "rgbBack", ",", "marker", ",", "grbit", ",", "icvFore", ",", "icvBack", ",", "miSize", ")", "# :nodoc:", "record", "=", "0x1009", "# Record identifier.", "length", "=", "0x0014", "# Number of bytes to follow.", "# ...
Write the MARKERFORMAT chart BIFF record.
[ "Write", "the", "MARKERFORMAT", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1574-L1595
19,056
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_objectlink
def store_objectlink(link_type) # :nodoc: record = 0x1027 # Record identifier. length = 0x0006 # Number of bytes to follow. # link_type # Object text link type. link_index1 = 0x0000 # Link index 1. link_index2 = 0x0000 # Link index 2. store_simple(record...
ruby
def store_objectlink(link_type) # :nodoc: record = 0x1027 # Record identifier. length = 0x0006 # Number of bytes to follow. # link_type # Object text link type. link_index1 = 0x0000 # Link index 1. link_index2 = 0x0000 # Link index 2. store_simple(record...
[ "def", "store_objectlink", "(", "link_type", ")", "# :nodoc:", "record", "=", "0x1027", "# Record identifier.", "length", "=", "0x0006", "# Number of bytes to follow.", "# link_type # Object text link type.", "link_index1", "=", "0x0000", "# Link index 1.", "link_i...
Write the OBJECTLINK chart BIFF record.
[ "Write", "the", "OBJECTLINK", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1600-L1608
19,057
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_plotgrowth
def store_plotgrowth # :nodoc: record = 0x1064 # Record identifier. length = 0x0008 # Number of bytes to follow. dx_plot = 0x00010000 # Horz growth for font scale. dy_plot = 0x00010000 # Vert growth for font scale. header = [record, length].pack('vv') data = [dx_plot...
ruby
def store_plotgrowth # :nodoc: record = 0x1064 # Record identifier. length = 0x0008 # Number of bytes to follow. dx_plot = 0x00010000 # Horz growth for font scale. dy_plot = 0x00010000 # Vert growth for font scale. header = [record, length].pack('vv') data = [dx_plot...
[ "def", "store_plotgrowth", "# :nodoc:", "record", "=", "0x1064", "# Record identifier.", "length", "=", "0x0008", "# Number of bytes to follow.", "dx_plot", "=", "0x00010000", "# Horz growth for font scale.", "dy_plot", "=", "0x00010000", "# Vert growth for font scale.", "heade...
Write the PLOTGROWTH chart BIFF record.
[ "Write", "the", "PLOTGROWTH", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1635-L1646
19,058
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_pos
def store_pos(mdTopLt, mdBotRt, x1, y1, x2, y2) # :nodoc: record = 0x104F # Record identifier. length = 0x0014 # Number of bytes to follow. # mdTopLt # Top left. # mdBotRt # Bottom right. # x1 # X coordinate. # y1 # Y coordinate. ...
ruby
def store_pos(mdTopLt, mdBotRt, x1, y1, x2, y2) # :nodoc: record = 0x104F # Record identifier. length = 0x0014 # Number of bytes to follow. # mdTopLt # Top left. # mdBotRt # Bottom right. # x1 # X coordinate. # y1 # Y coordinate. ...
[ "def", "store_pos", "(", "mdTopLt", ",", "mdBotRt", ",", "x1", ",", "y1", ",", "x2", ",", "y2", ")", "# :nodoc:", "record", "=", "0x104F", "# Record identifier.", "length", "=", "0x0014", "# Number of bytes to follow.", "# mdTopLt # Top left.", "# mdBotRt...
Write the POS chart BIFF record. Generally not required when using automatic positioning.
[ "Write", "the", "POS", "chart", "BIFF", "record", ".", "Generally", "not", "required", "when", "using", "automatic", "positioning", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1652-L1671
19,059
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_serauxtrend
def store_serauxtrend(reg_type, poly_order, equation, r_squared) # :nodoc: record = 0x104B # Record identifier. length = 0x001C # Number of bytes to follow. # reg_type # Regression type. # poly_order # Polynomial order. # equation # Display equat...
ruby
def store_serauxtrend(reg_type, poly_order, equation, r_squared) # :nodoc: record = 0x104B # Record identifier. length = 0x001C # Number of bytes to follow. # reg_type # Regression type. # poly_order # Polynomial order. # equation # Display equat...
[ "def", "store_serauxtrend", "(", "reg_type", ",", "poly_order", ",", "equation", ",", "r_squared", ")", "# :nodoc:", "record", "=", "0x104B", "# Record identifier.", "length", "=", "0x001C", "# Number of bytes to follow.", "# reg_type # Regression type.", "# po...
Write the SERAUXTREND chart BIFF record.
[ "Write", "the", "SERAUXTREND", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1676-L1703
19,060
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_series
def store_series(category_count, value_count) # :nodoc: record = 0x1003 # Record identifier. length = 0x000C # Number of bytes to follow. category_type = 0x0001 # Type: category. value_type = 0x0001 # Type: value. # category_count # Num of categories....
ruby
def store_series(category_count, value_count) # :nodoc: record = 0x1003 # Record identifier. length = 0x000C # Number of bytes to follow. category_type = 0x0001 # Type: category. value_type = 0x0001 # Type: value. # category_count # Num of categories....
[ "def", "store_series", "(", "category_count", ",", "value_count", ")", "# :nodoc:", "record", "=", "0x1003", "# Record identifier.", "length", "=", "0x000C", "# Number of bytes to follow.", "category_type", "=", "0x0001", "# Type: category.", "value_type", "=", "0x0001", ...
Write the SERIES chart BIFF record.
[ "Write", "the", "SERIES", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1708-L1720
19,061
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_seriestext
def store_seriestext(str, encoding) # :nodoc: ruby_19 { str = convert_to_ascii_if_ascii(str) } record = 0x100D # Record identifier. length = 0x0000 # Number of bytes to follow. id = 0x0000 # Text id. # str # Text. # encoding ...
ruby
def store_seriestext(str, encoding) # :nodoc: ruby_19 { str = convert_to_ascii_if_ascii(str) } record = 0x100D # Record identifier. length = 0x0000 # Number of bytes to follow. id = 0x0000 # Text id. # str # Text. # encoding ...
[ "def", "store_seriestext", "(", "str", ",", "encoding", ")", "# :nodoc:", "ruby_19", "{", "str", "=", "convert_to_ascii_if_ascii", "(", "str", ")", "}", "record", "=", "0x100D", "# Record identifier.", "length", "=", "0x0000", "# Number of bytes to follow.", "id", ...
Write the SERIESTEXT chart BIFF record.
[ "Write", "the", "SERIESTEXT", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1725-L1751
19,062
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_shtprops
def store_shtprops # :nodoc: record = 0x1044 # Record identifier. length = 0x0004 # Number of bytes to follow. grbit = 0x000E # Option flags. empty_cells = 0x0000 # Empty cell handling. grbit = 0x000A if @embedded store_simple(record, length, grbit, empty_cell...
ruby
def store_shtprops # :nodoc: record = 0x1044 # Record identifier. length = 0x0004 # Number of bytes to follow. grbit = 0x000E # Option flags. empty_cells = 0x0000 # Empty cell handling. grbit = 0x000A if @embedded store_simple(record, length, grbit, empty_cell...
[ "def", "store_shtprops", "# :nodoc:", "record", "=", "0x1044", "# Record identifier.", "length", "=", "0x0004", "# Number of bytes to follow.", "grbit", "=", "0x000E", "# Option flags.", "empty_cells", "=", "0x0000", "# Empty cell handling.", "grbit", "=", "0x000A", "if",...
Write the SHTPROPS chart BIFF record.
[ "Write", "the", "SHTPROPS", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1778-L1787
19,063
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_tick
def store_tick # :nodoc: record = 0x101E # Record identifier. length = 0x001E # Number of bytes to follow. tktMajor = 0x02 # Type of major tick mark. tktMinor = 0x00 # Type of minor tick mark. tlt = 0x03 # Tick label position. wBkgMod...
ruby
def store_tick # :nodoc: record = 0x101E # Record identifier. length = 0x001E # Number of bytes to follow. tktMajor = 0x02 # Type of major tick mark. tktMinor = 0x00 # Type of minor tick mark. tlt = 0x03 # Tick label position. wBkgMod...
[ "def", "store_tick", "# :nodoc:", "record", "=", "0x101E", "# Record identifier.", "length", "=", "0x001E", "# Number of bytes to follow.", "tktMajor", "=", "0x02", "# Type of major tick mark.", "tktMinor", "=", "0x00", "# Type of minor tick mark.", "tlt", "=", "0x03", "#...
Write the TICK chart BIFF record.
[ "Write", "the", "TICK", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1828-L1859
19,064
cxn03651/writeexcel
lib/writeexcel/chart.rb
Writeexcel.Chart.store_valuerange
def store_valuerange # :nodoc: record = 0x101F # Record identifier. length = 0x002A # Number of bytes to follow. numMin = 0x00000000 # Minimum value on axis. numMax = 0x00000000 # Maximum value on axis. numMajor = 0x00000000 # Value of major increment. numMi...
ruby
def store_valuerange # :nodoc: record = 0x101F # Record identifier. length = 0x002A # Number of bytes to follow. numMin = 0x00000000 # Minimum value on axis. numMax = 0x00000000 # Maximum value on axis. numMajor = 0x00000000 # Value of major increment. numMi...
[ "def", "store_valuerange", "# :nodoc:", "record", "=", "0x101F", "# Record identifier.", "length", "=", "0x002A", "# Number of bytes to follow.", "numMin", "=", "0x00000000", "# Minimum value on axis.", "numMax", "=", "0x00000000", "# Maximum value on axis.", "numMajor", "=",...
Write the VALUERANGE chart BIFF record.
[ "Write", "the", "VALUERANGE", "chart", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/chart.rb#L1864-L1885
19,065
cxn03651/writeexcel
lib/writeexcel/formula.rb
Writeexcel.Formula.parse_formula
def parse_formula(formula, byte_stream = false) # Build the parse tree for the formula tokens = reverse(parse(formula)) # Add a volatile token if the formula contains a volatile function. # This must be the first token in the list # tokens.unshift('_vol') if check_volatile(tokens) != 0 # T...
ruby
def parse_formula(formula, byte_stream = false) # Build the parse tree for the formula tokens = reverse(parse(formula)) # Add a volatile token if the formula contains a volatile function. # This must be the first token in the list # tokens.unshift('_vol') if check_volatile(tokens) != 0 # T...
[ "def", "parse_formula", "(", "formula", ",", "byte_stream", "=", "false", ")", "# Build the parse tree for the formula", "tokens", "=", "reverse", "(", "parse", "(", "formula", ")", ")", "# Add a volatile token if the formula contains a volatile function.", "# This must be th...
Takes a textual description of a formula and returns a RPN encoded byte string.
[ "Takes", "a", "textual", "description", "of", "a", "formula", "and", "returns", "a", "RPN", "encoded", "byte", "string", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/formula.rb#L38-L58
19,066
cxn03651/writeexcel
lib/writeexcel/formula.rb
Writeexcel.Formula.parse_tokens
def parse_tokens(tokens) parse_str = '' last_type = '' modifier = '' num_args = 0 _class = 0 _classary = [1] args = tokens.dup # A note about the class modifiers used below. In general the class, # "reference" or "value", of a function is applied to all of its...
ruby
def parse_tokens(tokens) parse_str = '' last_type = '' modifier = '' num_args = 0 _class = 0 _classary = [1] args = tokens.dup # A note about the class modifiers used below. In general the class, # "reference" or "value", of a function is applied to all of its...
[ "def", "parse_tokens", "(", "tokens", ")", "parse_str", "=", "''", "last_type", "=", "''", "modifier", "=", "''", "num_args", "=", "0", "_class", "=", "0", "_classary", "=", "[", "1", "]", "args", "=", "tokens", ".", "dup", "# A note about the class modifi...
Convert each token or token pair to its Excel 'ptg' equivalent.
[ "Convert", "each", "token", "or", "token", "pair", "to", "its", "Excel", "ptg", "equivalent", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/formula.rb#L63-L150
19,067
cxn03651/writeexcel
lib/writeexcel/formula.rb
Writeexcel.Formula.convert_number
def convert_number(num) # Integer in the range 0..2**16-1 if ((num =~ /^\d+$/) && (num.to_i <= 65535)) return [@ptg['ptgInt'], num.to_i].pack("Cv") else # A float num = [num.to_f].pack("d") num.reverse! if @byte_order return [@ptg['ptgNum']].pack("C") + num end end
ruby
def convert_number(num) # Integer in the range 0..2**16-1 if ((num =~ /^\d+$/) && (num.to_i <= 65535)) return [@ptg['ptgInt'], num.to_i].pack("Cv") else # A float num = [num.to_f].pack("d") num.reverse! if @byte_order return [@ptg['ptgNum']].pack("C") + num end end
[ "def", "convert_number", "(", "num", ")", "# Integer in the range 0..2**16-1", "if", "(", "(", "num", "=~", "/", "\\d", "/", ")", "&&", "(", "num", ".", "to_i", "<=", "65535", ")", ")", "return", "[", "@ptg", "[", "'ptgInt'", "]", ",", "num", ".", "t...
Convert a number token to ptgInt or ptgNum
[ "Convert", "a", "number", "token", "to", "ptgInt", "or", "ptgNum" ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/formula.rb#L265-L274
19,068
cxn03651/writeexcel
lib/writeexcel/formula.rb
Writeexcel.Formula.convert_string
def convert_string(str) ruby_19 { str = convert_to_ascii_if_ascii(str) } encoding = 0 str.sub!(/^"/,'') # Remove leading " str.sub!(/"$/,'') # Remove trailing " str.gsub!(/""/,'"') # Substitute Excel's escaped double quote "" for " # number of characters in str length = ruby_18 { str...
ruby
def convert_string(str) ruby_19 { str = convert_to_ascii_if_ascii(str) } encoding = 0 str.sub!(/^"/,'') # Remove leading " str.sub!(/"$/,'') # Remove trailing " str.gsub!(/""/,'"') # Substitute Excel's escaped double quote "" for " # number of characters in str length = ruby_18 { str...
[ "def", "convert_string", "(", "str", ")", "ruby_19", "{", "str", "=", "convert_to_ascii_if_ascii", "(", "str", ")", "}", "encoding", "=", "0", "str", ".", "sub!", "(", "/", "/", ",", "''", ")", "# Remove leading \"", "str", ".", "sub!", "(", "/", "/",...
Convert a string to a ptg Str.
[ "Convert", "a", "string", "to", "a", "ptg", "Str", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/formula.rb#L279-L302
19,069
cxn03651/writeexcel
lib/writeexcel/formula.rb
Writeexcel.Formula.convert_function
def convert_function(token, num_args) exit "Unknown function #{token}() in formula\n" if @functions[token][0].nil? args = @functions[token][1] # Fixed number of args eg. TIME($i,$j,$k). if (args >= 0) # Check that the number of args is valid. if (args != num_args) raise "Incorrect ...
ruby
def convert_function(token, num_args) exit "Unknown function #{token}() in formula\n" if @functions[token][0].nil? args = @functions[token][1] # Fixed number of args eg. TIME($i,$j,$k). if (args >= 0) # Check that the number of args is valid. if (args != num_args) raise "Incorrect ...
[ "def", "convert_function", "(", "token", ",", "num_args", ")", "exit", "\"Unknown function #{token}() in formula\\n\"", "if", "@functions", "[", "token", "]", "[", "0", "]", ".", "nil?", "args", "=", "@functions", "[", "token", "]", "[", "1", "]", "# Fixed num...
Convert a function to a ptgFunc or ptgFuncVarV depending on the number of args that it takes.
[ "Convert", "a", "function", "to", "a", "ptgFunc", "or", "ptgFuncVarV", "depending", "on", "the", "number", "of", "args", "that", "it", "takes", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/formula.rb#L532-L551
19,070
cxn03651/writeexcel
lib/writeexcel/formula.rb
Writeexcel.Formula.convert_name
def convert_name(name, _class) name_index = get_name_index(name) # The ptg value depends on the class of the ptg. if _class == 0 ptgName = @ptg['ptgName'] elsif _class == 1 ptgName = @ptg['ptgNameV'] elsif _class == 2 ptgName = @ptg['ptgNameA'] end [ptgName, name_index].p...
ruby
def convert_name(name, _class) name_index = get_name_index(name) # The ptg value depends on the class of the ptg. if _class == 0 ptgName = @ptg['ptgName'] elsif _class == 1 ptgName = @ptg['ptgNameV'] elsif _class == 2 ptgName = @ptg['ptgNameA'] end [ptgName, name_index].p...
[ "def", "convert_name", "(", "name", ",", "_class", ")", "name_index", "=", "get_name_index", "(", "name", ")", "# The ptg value depends on the class of the ptg.", "if", "_class", "==", "0", "ptgName", "=", "@ptg", "[", "'ptgName'", "]", "elsif", "_class", "==", ...
Convert a symbolic name into a name reference.
[ "Convert", "a", "symbolic", "name", "into", "a", "name", "reference", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/formula.rb#L556-L569
19,071
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.close
def close #:nodoc: ################################################ # Prepend in reverse order!! # # Prepend the sheet dimensions store_dimensions # Prepend the autofilter filters. store_autofilters # Prepend the sheet autofilter info. store_autofilterinfo # Prepend the sheet...
ruby
def close #:nodoc: ################################################ # Prepend in reverse order!! # # Prepend the sheet dimensions store_dimensions # Prepend the autofilter filters. store_autofilters # Prepend the sheet autofilter info. store_autofilterinfo # Prepend the sheet...
[ "def", "close", "#:nodoc:", "################################################", "# Prepend in reverse order!!", "#", "# Prepend the sheet dimensions", "store_dimensions", "# Prepend the autofilter filters.", "store_autofilters", "# Prepend the sheet autofilter info.", "store_autofilterinfo", ...
Constructor. Creates a new Worksheet object from a BIFFwriter object Add data to the beginning of the workbook (note the reverse order) and to the end of the workbook.
[ "Constructor", ".", "Creates", "a", "new", "Worksheet", "object", "from", "a", "BIFFwriter", "object" ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L163-L268
19,072
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.hide
def hide @hidden = true # A hidden worksheet shouldn't be active or selected. @selected = false @workbook.worksheets.activesheet = @workbook.worksheets.first @workbook.worksheets.firstsheet = @workbook.worksheets.first end
ruby
def hide @hidden = true # A hidden worksheet shouldn't be active or selected. @selected = false @workbook.worksheets.activesheet = @workbook.worksheets.first @workbook.worksheets.firstsheet = @workbook.worksheets.first end
[ "def", "hide", "@hidden", "=", "true", "# A hidden worksheet shouldn't be active or selected.", "@selected", "=", "false", "@workbook", ".", "worksheets", ".", "activesheet", "=", "@workbook", ".", "worksheets", ".", "first", "@workbook", ".", "worksheets", ".", "firs...
Hide this worksheet. The hide() method is used to hide a worksheet: worksheet2.hide You may wish to hide a worksheet in order to avoid confusing a user with intermediate data or calculations. A hidden worksheet can not be activated or selected so this method is mutually exclusive with the activate() and s...
[ "Hide", "this", "worksheet", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L355-L362
19,073
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.set_tab_color
def set_tab_color(color) color = Colors.new.get_color(color) color = 0 if color == 0x7FFF # Default color. @tab_color = color end
ruby
def set_tab_color(color) color = Colors.new.get_color(color) color = 0 if color == 0x7FFF # Default color. @tab_color = color end
[ "def", "set_tab_color", "(", "color", ")", "color", "=", "Colors", ".", "new", ".", "get_color", "(", "color", ")", "color", "=", "0", "if", "color", "==", "0x7FFF", "# Default color.", "@tab_color", "=", "color", "end" ]
Set the colour of the worksheet colour. The set_tab_color() method is used to change the colour of the worksheet tab. This feature is only available in Excel 2002 and later. You can use one of the standard colour names provided by the Format object or a colour index. See "COLOURS IN EXCEL" and the set_custom_color...
[ "Set", "the", "colour", "of", "the", "worksheet", "colour", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L1065-L1069
19,074
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.position_object
def position_object(col_start, row_start, x1, y1, width, height) #:nodoc: # col_start; # Col containing upper left corner of object # x1; # Distance to left side of object # row_start; # Row containing top left corner of object # y1; # Distance to top of object # col_end; # ...
ruby
def position_object(col_start, row_start, x1, y1, width, height) #:nodoc: # col_start; # Col containing upper left corner of object # x1; # Distance to left side of object # row_start; # Row containing top left corner of object # y1; # Distance to top of object # col_end; # ...
[ "def", "position_object", "(", "col_start", ",", "row_start", ",", "x1", ",", "y1", ",", "width", ",", "height", ")", "#:nodoc:", "# col_start; # Col containing upper left corner of object", "# x1; # Distance to left side of object", "# row_start; # Row containing top l...
Calculate the vertices that define the position of a graphical object within the worksheet. +------------+------------+ | A | B | +-----+------------+------------+ | |(x1,y1) | | | 1 |(A1)._______|______ | | | | | | |...
[ "Calculate", "the", "vertices", "that", "define", "the", "position", "of", "a", "graphical", "object", "within", "the", "worksheet", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L4410-L4471
19,075
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_mso_sp_container
def store_mso_sp_container(length) #:nodoc: type = 0xF004 version = 15 instance = 0 data = '' add_mso_generic(type, version, instance, data, length) end
ruby
def store_mso_sp_container(length) #:nodoc: type = 0xF004 version = 15 instance = 0 data = '' add_mso_generic(type, version, instance, data, length) end
[ "def", "store_mso_sp_container", "(", "length", ")", "#:nodoc:", "type", "=", "0xF004", "version", "=", "15", "instance", "=", "0", "data", "=", "''", "add_mso_generic", "(", "type", ",", "version", ",", "instance", ",", "data", ",", "length", ")", "end" ]
Write the Escher SpContainer record that is part of MSODRAWING.
[ "Write", "the", "Escher", "SpContainer", "record", "that", "is", "part", "of", "MSODRAWING", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L4489-L4496
19,076
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_mso_sp
def store_mso_sp(instance, spid, options) #:nodoc: type = 0xF00A version = 2 data = '' length = 8 data = [spid, options].pack('VV') add_mso_generic(type, version, instance, data, length) end
ruby
def store_mso_sp(instance, spid, options) #:nodoc: type = 0xF00A version = 2 data = '' length = 8 data = [spid, options].pack('VV') add_mso_generic(type, version, instance, data, length) end
[ "def", "store_mso_sp", "(", "instance", ",", "spid", ",", "options", ")", "#:nodoc:", "type", "=", "0xF00A", "version", "=", "2", "data", "=", "''", "length", "=", "8", "data", "=", "[", "spid", ",", "options", "]", ".", "pack", "(", "'VV'", ")", "...
Write the Escher Sp record that is part of MSODRAWING.
[ "Write", "the", "Escher", "Sp", "record", "that", "is", "part", "of", "MSODRAWING", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L4501-L4509
19,077
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_mso_client_data
def store_mso_client_data #:nodoc: type = 0xF011 version = 0 instance = 0 data = '' length = 0 add_mso_generic(type, version, instance, data, length) end
ruby
def store_mso_client_data #:nodoc: type = 0xF011 version = 0 instance = 0 data = '' length = 0 add_mso_generic(type, version, instance, data, length) end
[ "def", "store_mso_client_data", "#:nodoc:", "type", "=", "0xF011", "version", "=", "0", "instance", "=", "0", "data", "=", "''", "length", "=", "0", "add_mso_generic", "(", "type", ",", "version", ",", "instance", ",", "data", ",", "length", ")", "end" ]
Write the Escher ClientData record that is part of MSODRAWING.
[ "Write", "the", "Escher", "ClientData", "record", "that", "is", "part", "of", "MSODRAWING", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L4561-L4569
19,078
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.boundsheet
def boundsheet #:nodoc: hidden = self.hidden? ? 1 : 0 encoding = self.is_name_utf16be? ? 1 : 0 record = 0x0085 # Record identifier length = 0x08 + @name.bytesize # Number of bytes to follow cch = @name.bytesize # Length of sheet name # Charact...
ruby
def boundsheet #:nodoc: hidden = self.hidden? ? 1 : 0 encoding = self.is_name_utf16be? ? 1 : 0 record = 0x0085 # Record identifier length = 0x08 + @name.bytesize # Number of bytes to follow cch = @name.bytesize # Length of sheet name # Charact...
[ "def", "boundsheet", "#:nodoc:", "hidden", "=", "self", ".", "hidden?", "?", "1", ":", "0", "encoding", "=", "self", ".", "is_name_utf16be?", "?", "1", ":", "0", "record", "=", "0x0085", "# Record identifier", "length", "=", "0x08", "+", "@name", ".", "b...
Excel BIFF BOUNDSHEET record. sheetname # Worksheet name offset # Location of worksheet BOF type # Worksheet type hidden # Worksheet hidden flag encoding # Sheet name encoding
[ "Excel", "BIFF", "BOUNDSHEET", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L4584-L4605
19,079
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.parse_filter_expression
def parse_filter_expression(expression, tokens) #:nodoc: # The number of tokens will be either 3 (for 1 expression) # or 7 (for 2 expressions). # if (tokens.size == 7) conditional = tokens[3] if conditional =~ /^(and|&&)$/ conditional = 0 elsif conditional =~ /^(or|\|\|)$/ ...
ruby
def parse_filter_expression(expression, tokens) #:nodoc: # The number of tokens will be either 3 (for 1 expression) # or 7 (for 2 expressions). # if (tokens.size == 7) conditional = tokens[3] if conditional =~ /^(and|&&)$/ conditional = 0 elsif conditional =~ /^(or|\|\|)$/ ...
[ "def", "parse_filter_expression", "(", "expression", ",", "tokens", ")", "#:nodoc:", "# The number of tokens will be either 3 (for 1 expression)", "# or 7 (for 2 expressions).", "#", "if", "(", "tokens", ".", "size", "==", "7", ")", "conditional", "=", "tokens", "[", "...
Converts the tokens of a possibly conditional expression into 1 or 2 sub expressions for further parsing. Examples: ('x', '==', 2000) -> exp1 ('x', '>', 2000, 'and', 'x', '<', 5000) -> exp1 and exp2
[ "Converts", "the", "tokens", "of", "a", "possibly", "conditional", "expression", "into", "1", "or", "2", "sub", "expressions", "for", "further", "parsing", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L4775-L4795
19,080
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.xf_record_index
def xf_record_index(row, col, xf=nil) #:nodoc: if xf.respond_to?(:xf_index) xf.xf_index elsif @row_formats.has_key?(row) @row_formats[row].xf_index elsif @col_formats.has_key?(col) @col_formats[col].xf_index else 0x0F end end
ruby
def xf_record_index(row, col, xf=nil) #:nodoc: if xf.respond_to?(:xf_index) xf.xf_index elsif @row_formats.has_key?(row) @row_formats[row].xf_index elsif @col_formats.has_key?(col) @col_formats[col].xf_index else 0x0F end end
[ "def", "xf_record_index", "(", "row", ",", "col", ",", "xf", "=", "nil", ")", "#:nodoc:", "if", "xf", ".", "respond_to?", "(", ":xf_index", ")", "xf", ".", "xf_index", "elsif", "@row_formats", ".", "has_key?", "(", "row", ")", "@row_formats", "[", "row",...
Returns an index to the XF record in the workbook. Note: this is a function, not a method.
[ "Returns", "an", "index", "to", "the", "XF", "record", "in", "the", "workbook", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L4918-L4928
19,081
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.encode_password
def encode_password(password) i = 0 chars = password.split(//) count = chars.size chars.collect! do |char| i += 1 char = char.ord << i low_15 = char & 0x7fff high_15 = char & 0x7fff << 15 high_15 = high_15 >> 15 char = low_15 | high_15 end encode...
ruby
def encode_password(password) i = 0 chars = password.split(//) count = chars.size chars.collect! do |char| i += 1 char = char.ord << i low_15 = char & 0x7fff high_15 = char & 0x7fff << 15 high_15 = high_15 >> 15 char = low_15 | high_15 end encode...
[ "def", "encode_password", "(", "password", ")", "i", "=", "0", "chars", "=", "password", ".", "split", "(", "/", "/", ")", "count", "=", "chars", ".", "size", "chars", ".", "collect!", "do", "|", "char", "|", "i", "+=", "1", "char", "=", "char", ...
Based on the algorithm provided by Daniel Rentz of OpenOffice.
[ "Based", "on", "the", "algorithm", "provided", "by", "Daniel", "Rentz", "of", "OpenOffice", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5005-L5023
19,082
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.get_formula_string
def get_formula_string(string) #:nodoc: ruby_19 { string = convert_to_ascii_if_ascii(string) } record = 0x0207 # Record identifier length = 0x00 # Bytes to follow # string # Formula string. strlen = string.bytesize # Length of the formula string (...
ruby
def get_formula_string(string) #:nodoc: ruby_19 { string = convert_to_ascii_if_ascii(string) } record = 0x0207 # Record identifier length = 0x00 # Bytes to follow # string # Formula string. strlen = string.bytesize # Length of the formula string (...
[ "def", "get_formula_string", "(", "string", ")", "#:nodoc:", "ruby_19", "{", "string", "=", "convert_to_ascii_if_ascii", "(", "string", ")", "}", "record", "=", "0x0207", "# Record identifier", "length", "=", "0x00", "# Bytes to follow", "# string # Fo...
Pack the string value when a formula evaluates to a string. The value cannot be calculated by the module and thus must be supplied by the user.
[ "Pack", "the", "string", "value", "when", "a", "formula", "evaluates", "to", "a", "string", ".", "The", "value", "cannot", "be", "calculated", "by", "the", "module", "and", "thus", "must", "be", "supplied", "by", "the", "user", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5077-L5098
19,083
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_dimensions
def store_dimensions #:nodoc: record = 0x0200 # Record identifier length = 0x000E # Number of bytes to follow reserved = 0x0000 # Reserved by Excel @dimension.increment_row_max @dimension.increment_col_max header = [record, length].pack("vv") fields = [@dim...
ruby
def store_dimensions #:nodoc: record = 0x0200 # Record identifier length = 0x000E # Number of bytes to follow reserved = 0x0000 # Reserved by Excel @dimension.increment_row_max @dimension.increment_col_max header = [record, length].pack("vv") fields = [@dim...
[ "def", "store_dimensions", "#:nodoc:", "record", "=", "0x0200", "# Record identifier", "length", "=", "0x000E", "# Number of bytes to follow", "reserved", "=", "0x0000", "# Reserved by Excel", "@dimension", ".", "increment_row_max", "@dimension", ".", "increment_col_max", "...
Writes Excel DIMENSIONS to define the area in which there is cell data. Notes: Excel stores the max row/col as row/col +1. Max and min values of 0 are used to indicate that no cell data. We set the undef member data to 0 since it is used by store_table(). Inserting images or charts doesn't change the DIME...
[ "Writes", "Excel", "DIMENSIONS", "to", "define", "the", "area", "in", "which", "there", "is", "cell", "data", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5508-L5521
19,084
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_window2
def store_window2 #:nodoc: record = 0x023E # Record identifier length = 0x0012 # Number of bytes to follow grbit = 0x00B6 # Option flags rwTop = @first_row # Top visible row colLeft = @first_col # Leftmost visible column rgbHdr ...
ruby
def store_window2 #:nodoc: record = 0x023E # Record identifier length = 0x0012 # Number of bytes to follow grbit = 0x00B6 # Option flags rwTop = @first_row # Top visible row colLeft = @first_col # Leftmost visible column rgbHdr ...
[ "def", "store_window2", "#:nodoc:", "record", "=", "0x023E", "# Record identifier", "length", "=", "0x0012", "# Number of bytes to follow", "grbit", "=", "0x00B6", "# Option flags", "rwTop", "=", "@first_row", "# Top visible row", "colLeft", "=", "@first_col", "# Leftmost...
Write BIFF record Window2.
[ "Write", "BIFF", "record", "Window2", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5526-L5571
19,085
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_tab_color
def store_tab_color #:nodoc: color = @tab_color return if color == 0 record = 0x0862 # Record identifier length = 0x0014 # Number of bytes to follow zero = 0x0000 unknown = 0x0014 store_simple(record, length, record, zero, zero, zero, zero, zero, unkno...
ruby
def store_tab_color #:nodoc: color = @tab_color return if color == 0 record = 0x0862 # Record identifier length = 0x0014 # Number of bytes to follow zero = 0x0000 unknown = 0x0014 store_simple(record, length, record, zero, zero, zero, zero, zero, unkno...
[ "def", "store_tab_color", "#:nodoc:", "color", "=", "@tab_color", "return", "if", "color", "==", "0", "record", "=", "0x0862", "# Record identifier", "length", "=", "0x0014", "# Number of bytes to follow", "zero", "=", "0x0000", "unknown", "=", "0x0014", "store_simp...
Write the Tab Color BIFF record.
[ "Write", "the", "Tab", "Color", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5585-L5598
19,086
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_defrow
def store_defrow #:nodoc: record = 0x0225 # Record identifier length = 0x0004 # Number of bytes to follow grbit = 0x0000 # Options. height = 0x00FF # Default row height header = [record, length].pack("vv") data = [grbit, height].pack("vv") prepend(header,...
ruby
def store_defrow #:nodoc: record = 0x0225 # Record identifier length = 0x0004 # Number of bytes to follow grbit = 0x0000 # Options. height = 0x00FF # Default row height header = [record, length].pack("vv") data = [grbit, height].pack("vv") prepend(header,...
[ "def", "store_defrow", "#:nodoc:", "record", "=", "0x0225", "# Record identifier", "length", "=", "0x0004", "# Number of bytes to follow", "grbit", "=", "0x0000", "# Options.", "height", "=", "0x00FF", "# Default row height", "header", "=", "[", "record", ",", "length...
Write BIFF record DEFROWHEIGHT.
[ "Write", "BIFF", "record", "DEFROWHEIGHT", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5603-L5614
19,087
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_defcol
def store_defcol #:nodoc: record = 0x0055 # Record identifier length = 0x0002 # Number of bytes to follow colwidth = 0x0008 # Default column width header = [record, length].pack("vv") data = [colwidth].pack("v") prepend(header, data) end
ruby
def store_defcol #:nodoc: record = 0x0055 # Record identifier length = 0x0002 # Number of bytes to follow colwidth = 0x0008 # Default column width header = [record, length].pack("vv") data = [colwidth].pack("v") prepend(header, data) end
[ "def", "store_defcol", "#:nodoc:", "record", "=", "0x0055", "# Record identifier", "length", "=", "0x0002", "# Number of bytes to follow", "colwidth", "=", "0x0008", "# Default column width", "header", "=", "[", "record", ",", "length", "]", ".", "pack", "(", "\"vv\...
Write BIFF record DEFCOLWIDTH.
[ "Write", "BIFF", "record", "DEFCOLWIDTH", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5619-L5628
19,088
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_autofilterinfo
def store_autofilterinfo #:nodoc: # Only write the record if the worksheet contains an autofilter. return '' if @filter_area.count == 0 record = 0x009D # Record identifier length = 0x0002 # Number of bytes to follow num_filters = @filter_area.count header = [record, lengt...
ruby
def store_autofilterinfo #:nodoc: # Only write the record if the worksheet contains an autofilter. return '' if @filter_area.count == 0 record = 0x009D # Record identifier length = 0x0002 # Number of bytes to follow num_filters = @filter_area.count header = [record, lengt...
[ "def", "store_autofilterinfo", "#:nodoc:", "# Only write the record if the worksheet contains an autofilter.", "return", "''", "if", "@filter_area", ".", "count", "==", "0", "record", "=", "0x009D", "# Record identifier", "length", "=", "0x0002", "# Number of bytes to follow", ...
Write BIFF record AUTOFILTERINFO.
[ "Write", "BIFF", "record", "AUTOFILTERINFO", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5653-L5665
19,089
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_selection
def store_selection(first_row=0, first_col=0, last_row = nil, last_col =nil) #:nodoc: record = 0x001D # Record identifier length = 0x000F # Number of bytes to follow pane_position = @active_pane # Pane position row_active = first_row # Active ro...
ruby
def store_selection(first_row=0, first_col=0, last_row = nil, last_col =nil) #:nodoc: record = 0x001D # Record identifier length = 0x000F # Number of bytes to follow pane_position = @active_pane # Pane position row_active = first_row # Active ro...
[ "def", "store_selection", "(", "first_row", "=", "0", ",", "first_col", "=", "0", ",", "last_row", "=", "nil", ",", "last_col", "=", "nil", ")", "#:nodoc:", "record", "=", "0x001D", "# Record identifier", "length", "=", "0x000F", "# Number of bytes to follow", ...
Write BIFF record SELECTION.
[ "Write", "BIFF", "record", "SELECTION", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5670-L5694
19,090
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_externcount
def store_externcount(count) #:nodoc: record = 0x0016 # Record identifier length = 0x0002 # Number of bytes to follow cxals = count # Number of external references header = [record, length].pack('vv') data = [cxals].pack('v') prepend(header, data) end
ruby
def store_externcount(count) #:nodoc: record = 0x0016 # Record identifier length = 0x0002 # Number of bytes to follow cxals = count # Number of external references header = [record, length].pack('vv') data = [cxals].pack('v') prepend(header, data) end
[ "def", "store_externcount", "(", "count", ")", "#:nodoc:", "record", "=", "0x0016", "# Record identifier", "length", "=", "0x0002", "# Number of bytes to follow", "cxals", "=", "count", "# Number of external references", "header", "=", "[", "record", ",", "length", "]...
Write BIFF record EXTERNCOUNT to indicate the number of external sheet references in a worksheet. Excel only stores references to external sheets that are used in formulas. For simplicity we store references to all the sheets in the workbook regardless of whether they are used or not. This reduces the overall com...
[ "Write", "BIFF", "record", "EXTERNCOUNT", "to", "indicate", "the", "number", "of", "external", "sheet", "references", "in", "a", "worksheet", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5706-L5716
19,091
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_setup
def store_setup #:nodoc: record = 0x00A1 # Record identifier length = 0x0022 # Number of bytes to follow iPaperSize = @paper_size # Paper size iScale = @print_scale # Print scaling factor iPageStart = @page_start # Starting page numb...
ruby
def store_setup #:nodoc: record = 0x00A1 # Record identifier length = 0x0022 # Number of bytes to follow iPaperSize = @paper_size # Paper size iScale = @print_scale # Print scaling factor iPageStart = @page_start # Starting page numb...
[ "def", "store_setup", "#:nodoc:", "record", "=", "0x00A1", "# Record identifier", "length", "=", "0x0022", "# Number of bytes to follow", "iPaperSize", "=", "@paper_size", "# Paper size", "iScale", "=", "@print_scale", "# Print scaling factor", "iPageStart", "=", "@page_sta...
Store the page setup SETUP BIFF record.
[ "Store", "the", "page", "setup", "SETUP", "BIFF", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L5807-L5859
19,092
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_gridset
def store_gridset #:nodoc: record = 0x0082 # Record identifier length = 0x0002 # Bytes to follow fGridSet = @print_gridlines == 0 ? 1 : 0 # Boolean flag header = [record, length].pack("vv") data = [fGridSet].pack("v") pr...
ruby
def store_gridset #:nodoc: record = 0x0082 # Record identifier length = 0x0002 # Bytes to follow fGridSet = @print_gridlines == 0 ? 1 : 0 # Boolean flag header = [record, length].pack("vv") data = [fGridSet].pack("v") pr...
[ "def", "store_gridset", "#:nodoc:", "record", "=", "0x0082", "# Record identifier", "length", "=", "0x0002", "# Bytes to follow", "fGridSet", "=", "@print_gridlines", "==", "0", "?", "1", ":", "0", "# Boolean flag", "header", "=", "[", "record", ",", "length", "...
Write the GRIDSET BIFF record. Must be used in conjunction with the PRINTGRIDLINES record.
[ "Write", "the", "GRIDSET", "BIFF", "record", ".", "Must", "be", "used", "in", "conjunction", "with", "the", "PRINTGRIDLINES", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L6032-L6042
19,093
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_wsbool
def store_wsbool #:nodoc: record = 0x0081 # Record identifier length = 0x0002 # Bytes to follow grbit = 0x0000 # Option flags # Set the option flags grbit |= 0x0001 # Auto page breaks visible grbit |= 0x0020 if @outline.style != 0 # Auto outline s...
ruby
def store_wsbool #:nodoc: record = 0x0081 # Record identifier length = 0x0002 # Bytes to follow grbit = 0x0000 # Option flags # Set the option flags grbit |= 0x0001 # Auto page breaks visible grbit |= 0x0020 if @outline.style != 0 # Auto outline s...
[ "def", "store_wsbool", "#:nodoc:", "record", "=", "0x0081", "# Record identifier", "length", "=", "0x0002", "# Bytes to follow", "grbit", "=", "0x0000", "# Option flags", "# Set the option flags", "grbit", "|=", "0x0001", "# Auto page breaks visible", "grbit", "|=", "0x00...
Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction with the SETUP record.
[ "Write", "the", "WSBOOL", "BIFF", "record", "mainly", "for", "fit", "-", "to", "-", "page", ".", "Used", "in", "conjunction", "with", "the", "SETUP", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L6083-L6101
19,094
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_password
def store_password #:nodoc: # Exit unless sheet protection and password have been specified return unless protect? && @password record = 0x0013 # Record identifier length = 0x0002 # Bytes to follow wPassword = @password # Encoded password ...
ruby
def store_password #:nodoc: # Exit unless sheet protection and password have been specified return unless protect? && @password record = 0x0013 # Record identifier length = 0x0002 # Bytes to follow wPassword = @password # Encoded password ...
[ "def", "store_password", "#:nodoc:", "# Exit unless sheet protection and password have been specified", "return", "unless", "protect?", "&&", "@password", "record", "=", "0x0013", "# Record identifier", "length", "=", "0x0002", "# Bytes to follow", "wPassword", "=", "@password"...
Write the worksheet PASSWORD record.
[ "Write", "the", "worksheet", "PASSWORD", "record", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L6175-L6188
19,095
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_table
def store_table #:nodoc: return unless compatibility? # Offset from the DBCELL record back to the first ROW of the 32 row block. row_offset = 0 # Track rows that have cell data or modified by set_row(). written_rows = [] # Write the ROW records with updated max/min col fields. # (0...
ruby
def store_table #:nodoc: return unless compatibility? # Offset from the DBCELL record back to the first ROW of the 32 row block. row_offset = 0 # Track rows that have cell data or modified by set_row(). written_rows = [] # Write the ROW records with updated max/min col fields. # (0...
[ "def", "store_table", "#:nodoc:", "return", "unless", "compatibility?", "# Offset from the DBCELL record back to the first ROW of the 32 row block.", "row_offset", "=", "0", "# Track rows that have cell data or modified by set_row().", "written_rows", "=", "[", "]", "# Write the ROW re...
Note about compatibility mode. Excel doesn't require every possible Biff record to be present in a file. In particular if the indexing records INDEX, ROW and DBCELL aren't present it just ignores the fact and reads the cells anyway. This is also true of the EXTSST record. Gnumeric and OOo also take this approach. ...
[ "Note", "about", "compatibility", "mode", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L6219-L6297
19,096
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.size_col
def size_col(col) #:nodoc: # Look up the cell value to see if it has been changed if @col_sizes[col] width = @col_sizes[col] # The relationship is different for user units less than 1. if width < 1 (width *12).to_i else (width *7 +5 ).to_i end else 64 ...
ruby
def size_col(col) #:nodoc: # Look up the cell value to see if it has been changed if @col_sizes[col] width = @col_sizes[col] # The relationship is different for user units less than 1. if width < 1 (width *12).to_i else (width *7 +5 ).to_i end else 64 ...
[ "def", "size_col", "(", "col", ")", "#:nodoc:", "# Look up the cell value to see if it has been changed", "if", "@col_sizes", "[", "col", "]", "width", "=", "@col_sizes", "[", "col", "]", "# The relationship is different for user units less than 1.", "if", "width", "<", "...
Convert the width of a cell from user's units to pixels. Excel rounds the column width to the nearest pixel. If the width hasn't been set by the user we use the default value. If the column is hidden we use a value of zero.
[ "Convert", "the", "width", "of", "a", "cell", "from", "user", "s", "units", "to", "pixels", ".", "Excel", "rounds", "the", "column", "width", "to", "the", "nearest", "pixel", ".", "If", "the", "width", "hasn", "t", "been", "set", "by", "the", "user", ...
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L6364-L6378
19,097
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.store_autofilter
def store_autofilter(index, operator_1, token_1, #:nodoc: join = nil, operator_2 = nil, token_2 = nil) record = 0x009E length = 0x0000 top10_active = 0 top10_direction = 0 top10_percent = 0 top10_value = 101 grbit = join |...
ruby
def store_autofilter(index, operator_1, token_1, #:nodoc: join = nil, operator_2 = nil, token_2 = nil) record = 0x009E length = 0x0000 top10_active = 0 top10_direction = 0 top10_percent = 0 top10_value = 101 grbit = join |...
[ "def", "store_autofilter", "(", "index", ",", "operator_1", ",", "token_1", ",", "#:nodoc:", "join", "=", "nil", ",", "operator_2", "=", "nil", ",", "token_2", "=", "nil", ")", "record", "=", "0x009E", "length", "=", "0x0000", "top10_active", "=", "0", "...
Function to write worksheet AUTOFILTER records. These contain 2 Biff Doper structures to represent the 2 possible filter conditions.
[ "Function", "to", "write", "worksheet", "AUTOFILTER", "records", ".", "These", "contain", "2", "Biff", "Doper", "structures", "to", "represent", "the", "2", "possible", "filter", "conditions", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L6444-L6520
19,098
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.pack_doper
def pack_doper(operator, token) #:nodoc: doper = '' string = '' # Return default doper for non-defined filters. unless operator return pack_unused_doper, string end if token.to_s =~ /^blanks|nonblanks$/i doper = pack_blanks_doper(operator, token) elsif operator ==...
ruby
def pack_doper(operator, token) #:nodoc: doper = '' string = '' # Return default doper for non-defined filters. unless operator return pack_unused_doper, string end if token.to_s =~ /^blanks|nonblanks$/i doper = pack_blanks_doper(operator, token) elsif operator ==...
[ "def", "pack_doper", "(", "operator", ",", "token", ")", "#:nodoc:", "doper", "=", "''", "string", "=", "''", "# Return default doper for non-defined filters.", "unless", "operator", "return", "pack_unused_doper", ",", "string", "end", "if", "token", ".", "to_s", ...
Create a Biff Doper structure that represents a filter expression. Depending on the type of the token we pack an Empty, String or Number doper.
[ "Create", "a", "Biff", "Doper", "structure", "that", "represents", "a", "filter", "expression", ".", "Depending", "on", "the", "type", "of", "the", "token", "we", "pack", "an", "Empty", "String", "or", "Number", "doper", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L6526-L6562
19,099
cxn03651/writeexcel
lib/writeexcel/worksheet.rb
Writeexcel.Worksheet.pack_number_doper
def pack_number_doper(operator, number) #:nodoc: number = [number].pack('d') number.reverse! if @byte_order [0x04, operator].pack('CC') + number end
ruby
def pack_number_doper(operator, number) #:nodoc: number = [number].pack('d') number.reverse! if @byte_order [0x04, operator].pack('CC') + number end
[ "def", "pack_number_doper", "(", "operator", ",", "number", ")", "#:nodoc:", "number", "=", "[", "number", "]", ".", "pack", "(", "'d'", ")", "number", ".", "reverse!", "if", "@byte_order", "[", "0x04", ",", "operator", "]", ".", "pack", "(", "'CC'", "...
Pack an IEEE double number Doper structure.
[ "Pack", "an", "IEEE", "double", "number", "Doper", "structure", "." ]
d0345067c21b14a7141ba66b6752be8f4be379de
https://github.com/cxn03651/writeexcel/blob/d0345067c21b14a7141ba66b6752be8f4be379de/lib/writeexcel/worksheet.rb#L6604-L6609