Skip to main content

Home/ softwaretest/ Group items tagged ruby

Rss Feed Group items tagged

swan lin

First Ruby Program: Ruby Study Notes - Best Ruby Guide, Ruby Tutorial - 0 views

  • Press the F8 key to open an output window
  • Ctrl+Shift+I - this opens the Indentation Settings window
  • All Ruby source files have the .rb file extension
  • ...13 more annotations...
  • Foo class has name foo.rb
  • puts (s in puts stands for string; puts really means put string)
  • g) > simply writes onto the screen whatever comes after it,
  • simply writes onto the screen whatever comes after it
  • a. Parentheses are usually optional with a method call. These calls are all valid:foobarfoobar()foobar(a, b, c)foobar a, b, c
  • everything from an integer to a string is considered to be an object
  • To use a method, you need to put a dot after the object, and then append the method name.
  • Some methods such as puts and gets are available everywhere and don't need to be associated with a specific object.
  • provided by Ruby's Kernel module
  • When you run a Ruby application, an object called main of class Object is automatically created. This object provides access to the Kernel methods.
  • String literals are sequences of characters between single or double quotation marks
  • I am using single quotes around Hello. ' is more efficient than "
  • Ruby is an interpreted language
swan lin

Fun with Strings: Ruby Study Notes - Best Ruby Guide, Ruby Tutorial - 0 views

  • does not have anything in it at all; we call that an empty string.
  • n Ruby, strings are mutable. They can expand as needed, without using much time and memory. Ruby stores a string as a sequence of bytes.
  • The command output string is sent to the operating system as a command to be executed
  • ...1 more annotation...
  • puts 'It\'s my Ruby' 
    • swan lin
       
      \ 的作用相当于一个 '
swan lin

Ruby Features: Ruby Study Notes - Best Ruby Guide, Ruby Tutorial - 0 views

  • Free format
  • Case sensitive
  • Comments - Anything following an unquoted #, to the end of the line on which it appears, is ignored by the interpreter. Also, to facilitate large comment blocks, the ruby interpreter also ignores anything between a line starting with =begin and another line starting with =end
  • ...2 more annotations...
  • Statement delimiters
  • But in Ruby, all of these are true; in fact, everything is true except the reserved words false and nil.
swan lin

Ruby Mentor, Guide: Ruby Study Notes - Best Ruby Guide, Ruby Tutorial - 0 views

  • It is my observation that if one learns a programming language along with a group and with set targets every day; one learns faster.
swan lin

Numbers in Ruby: Ruby Study Notes - Best Ruby Guide, Ruby Tutorial - 0 views

  • Ruby integers are objects of class Fixnum or Bignum. The Fixnum and Bignum classes represent integers of differing sizes. Both classes descend from Integer (and therefore Numeric). The floating-point numbers are objects of class Float, corresponding to the native architecture's double data type.
swan lin

Ruby Installation: Ruby Study Notes - Best Ruby Guide, Ruby Tutorial - 0 views

  • Yukihiro Matsumoto, commonly known as 'Matz' created the Ruby language in 1993
swan lin

Ruby From Other Languages - 0 views

  • an identifier starts with a capital letter, it is a constant
  • starts with a dollar sign ($), it is a global variable
  • starts with @, it is an instance variable
  • ...6 more annotations...
  • starts with @@, it is a class variable.
  • Method names
  • start with capital letters
  • Ruby doesn’t have keyword parameters,
  • In Ruby, everything except nil and false is considered true.
  • Singleton methods are per-object methods. They are only available on the Object you defined it on.
swan lin

Ruby in Twenty Minutes - 0 views

  • puts is the basic command to print something out in Ruby.
  • puts always returns nil, which is Ruby’s absolutely-positively-nothing value.
  • In Ruby ** is the way you say “to the power of”
  • ...1 more annotation...
  • floating-point number.
swan lin

LinuxDevCenter.com -- An Interview with the Creator of Ruby - 0 views

  • Ruby has been described as an absolutely pure object-oriented scripting language and a genuine attempt to combine the best of everything in the scripting world.
  • Yukihiro Matsumoto (or "Matz" as he's known online) is the creator of Ruby
swan lin

rubylearning.com :: View topic - Important: Read This First - 0 views

  • Objective: To get you up-to-speed in Core Ruby programming. Learning and asking questions as a group 'jump-starts' the Ruby learning process.
    • swan lin
       
      ruby lesson index
swan lin

Ruby in Twenty Minutes - 0 views

  • In Ruby, anything on a line after a hash mark is a comment and is ignored by the interpreter
  • __FILE__ is the magic variable that contains the name of the current file.
  • $0 is the name of the file used to start the program.
swan lin

Ruby in Twenty Minutes - 0 views

  • Ruby uses the good object-oriented approach of keeping data sort-of hidden away.
swan lin

Ruby in Twenty Minutes - 0 views

  • @name. This is an instance variable, and is available to all the methods of the class
  • Ruby’s response => nil tells us that it knows we’re done defining the method
  • h to take a name as a parameter.
  • ...1 more annotation...
  • saying is “If the name isn’t supplied, use the default name of "World"”.
swan lin

rubylearning.com :: View topic - Lesson 1 - 0 views

  • We shall be referring to the documentation here - http://www.ruby-doc.org/core/
  • Constants begin with capital letters. Example PI, Length
swan lin

Selenium Better Pratice - 桃之夭夭 - BlogJava - 1 views

  • r use Selenium FIT mode Selenium分为两种运行模式,Driven Mo
1 - 19 of 19
Showing 20 items per page