Class: Shaf::Generator::Base
- Inherits:
-
Object
- Object
- Shaf::Generator::Base
show all
- Defined in:
- lib/shaf/generator/base.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(*args, **options) ⇒ Base
Returns a new instance of Base.
33
34
35
36
|
# File 'lib/shaf/generator/base.rb', line 33
def initialize(*args, **options)
@args = args
@options = options
end
|
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
11
12
13
|
# File 'lib/shaf/generator/base.rb', line 11
def args
@args
end
|
#options ⇒ Object
Returns the value of attribute options.
11
12
13
|
# File 'lib/shaf/generator/base.rb', line 11
def options
@options
end
|
Class Method Details
.identified_by ⇒ Object
26
27
28
|
# File 'lib/shaf/generator/base.rb', line 26
def identified_by
@identifiers
end
|
.identifier(*ids) ⇒ Object
18
19
20
|
# File 'lib/shaf/generator/base.rb', line 18
def identifier(*ids)
@identifiers = ids.flatten
end
|
.inherited(child) ⇒ Object
14
15
16
|
# File 'lib/shaf/generator/base.rb', line 14
def inherited(child)
Factory.register(child)
end
|
.options(option_parser, options) ⇒ Object
30
|
# File 'lib/shaf/generator/base.rb', line 30
def options(option_parser, options); end
|
.usage(str = nil, &block) ⇒ Object
22
23
24
|
# File 'lib/shaf/generator/base.rb', line 22
def usage(str = nil, &block)
@usage = str || block
end
|
Instance Method Details
#call ⇒ Object
38
|
# File 'lib/shaf/generator/base.rb', line 38
def call; end
|
#identifier ⇒ Object
40
41
42
|
# File 'lib/shaf/generator/base.rb', line 40
def identifier
self.class.identified_by
end
|