Sha256: 4a9588dde6cb381ee4898afe621ee4e47671f6ae06a024659ce6b6fa2930c922

Contents?: true

Size: 241 Bytes

Versions: 127

Compression:

Stored size: 241 Bytes

Contents

class Greet {
  def name
  Greet(who) { name = who[0].toUpperCase() +
                      who[1..-1] }
  def salute() { println "Hello $name!" }
}

g = new Greet('world')  // create object
g.salute()               // output "Hello World!"

Version data entries

127 entries across 125 versions & 9 rubygems

Version Path
rouge-1.8.0 lib/rouge/demos/groovy
rouge-1.7.7 lib/rouge/demos/groovy
rouge-1.7.4 lib/rouge/demos/groovy
rouge-1.7.3 lib/rouge/demos/groovy
rouge-1.7.2 lib/rouge/demos/groovy
rouge-1.7.1 lib/rouge/demos/groovy
rouge-1.7.0 lib/rouge/demos/groovy
rouge-1.6.2 lib/rouge/demos/groovy
rouge-1.6.1 lib/rouge/demos/groovy
rouge-1.5.1 lib/rouge/demos/groovy
rouge-1.5.0 lib/rouge/demos/groovy
rouge-1.4.0 lib/rouge/demos/groovy
rouge-1.3.4 lib/rouge/demos/groovy
rouge-1.3.3 lib/rouge/demos/groovy
rouge-1.3.2 lib/rouge/demos/groovy
rouge-1.3.1 lib/rouge/demos/groovy
rouge-1.3.0 lib/rouge/demos/groovy
rouge-1.2.0 lib/rouge/demos/groovy
rouge-1.1.0 lib/rouge/demos/groovy
rouge-0.5.4 lib/rouge/demos/groovy