Class: Dslable::Generators::RSpec::SpecTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/rspec/spec_template.rb

Overview

Dslable::Generators::RSpec RSpec Template Generator(only execute ‘rspec –init’)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_dsl) ⇒ SpecTemplate

initialize generate rspec template

Params

  • _dsl: input from dsl



12
13
14
# File 'lib/generators/rspec/spec_template.rb', line 12

def initialize(_dsl)
  @dsl = _dsl
end

Instance Attribute Details

#dslObject

Returns the value of attribute dsl.



7
8
9
# File 'lib/generators/rspec/spec_template.rb', line 7

def dsl
  @dsl
end

Instance Method Details

#generateObject

generate rspec template



17
18
19
# File 'lib/generators/rspec/spec_template.rb', line 17

def generate
  `rspec --init`
end