Class: Cany::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/cany/specification.rb,
lib/cany/specification/dsl.rb

Defined Under Namespace

Classes: DSL

Constant Summary collapse

EXT =
'canspec'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dsl = Cany::Specification::DSL, &block) ⇒ Specification

Returns a new instance of Specification.



12
13
14
15
# File 'lib/cany/specification.rb', line 12

def initialize(dsl=Cany::Specification::DSL, &block)
  @recipes = []
  setup dsl, &block
end

Instance Attribute Details

#base_dirObject

Returns the value of attribute base_dir.



9
10
11
# File 'lib/cany/specification.rb', line 9

def base_dir
  @base_dir
end

#binaryObject

Returns the value of attribute binary.



10
11
12
# File 'lib/cany/specification.rb', line 10

def binary
  @binary
end

#buildObject

Returns the value of attribute build.



10
11
12
# File 'lib/cany/specification.rb', line 10

def build
  @build
end

#descriptionObject

Returns the value of attribute description.



8
9
10
# File 'lib/cany/specification.rb', line 8

def description
  @description
end

#licenceObject

Returns the value of attribute licence.



8
9
10
# File 'lib/cany/specification.rb', line 8

def licence
  @licence
end

#maintainer_emailObject

Returns the value of attribute maintainer_email.



8
9
10
# File 'lib/cany/specification.rb', line 8

def maintainer_email
  @maintainer_email
end

#maintainer_nameObject

Returns the value of attribute maintainer_name.



8
9
10
# File 'lib/cany/specification.rb', line 8

def maintainer_name
  @maintainer_name
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/cany/specification.rb', line 8

def name
  @name
end

#recipesObject

Returns the value of attribute recipes.



9
10
11
# File 'lib/cany/specification.rb', line 9

def recipes
  @recipes
end

#versionObject

Returns the value of attribute version.



8
9
10
# File 'lib/cany/specification.rb', line 8

def version
  @version
end

#websiteObject

Returns the value of attribute website.



8
9
10
# File 'lib/cany/specification.rb', line 8

def website
  @website
end

Instance Method Details

#setup(dsl = Cany::Specification::DSL, &block) ⇒ Object



17
18
19
# File 'lib/cany/specification.rb', line 17

def setup(dsl=Cany::Specification::DSL, &block)
  dsl.new(self).exec(&block)
end