Module: Blur::Script::DSL

Included in:
Extension, Blur::Script
Defined in:
library/blur/script/dsl.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
# File 'library/blur/script/dsl.rb', line 6

def self.included base
  base.send :attr_accessor, :__name
  base.send :attr_accessor, :__author
  base.send :attr_accessor, :__version
  base.send :attr_accessor, :__description
end

Instance Method Details

#Author(*authors) ⇒ Object Also known as: Authors

Set the author.

Examples:

Author "John Doe <[email protected]>"


17
18
19
# File 'library/blur/script/dsl.rb', line 17

def Author *authors
  @__author = authors.join ', '
end

#authorObject

Returns the name of the author(s).

Returns:

  • the name of the author(s).



41
# File 'library/blur/script/dsl.rb', line 41

def author; @__author end

#Description(description) ⇒ Object

Set the description.

Examples:

Description "This is an example script."


25
26
27
# File 'library/blur/script/dsl.rb', line 25

def Description description
  @__description = description
end

#descriptionObject

Returns the description.

Returns:

  • the description.



47
# File 'library/blur/script/dsl.rb', line 47

def description; @__description end

#nameObject

Returns the name of the script.

Returns:

  • the name of the script.



38
# File 'library/blur/script/dsl.rb', line 38

def name; @__name end

#Version(version) ⇒ Object

Set the version.

Examples:

Version "1.0"


33
34
35
# File 'library/blur/script/dsl.rb', line 33

def Version version
  @__version = version
end

#versionObject

Returns the script version.

Returns:

  • the script version.



44
# File 'library/blur/script/dsl.rb', line 44

def version; @__version end