Class: Transpec::Syntax::RSpecConfigure::Framework

Inherits:
Object
  • Object
show all
Includes:
AST::Sexp, ConfigurationAddition, SyntaxConfiguration, Util
Defined in:
lib/transpec/syntax/rspec_configure/framework.rb

Direct Known Subclasses

Expectations, Mocks

Defined Under Namespace

Modules: ConfigurationAddition, SyntaxConfiguration

Constant Summary

Constants included from Util

Util::LITERAL_TYPES, Util::WHITESPACES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SyntaxConfiguration

#syntaxes, #syntaxes=

Methods included from ConfigurationAddition

#add_configuration!, #block_node_to_insert_code, #body_indentation, #config_variable_name, #empty_block_body?, #framework_begin_code, #framework_end_code, #new_config_variable_name, #rspec_configure_body_indentation

Methods included from Util

beginning_of_line_range, block_node_taken_by_method, const_name, contain_here_document?, each_backward_chained_node, each_forward_chained_node, each_line_range, end_of_line_range, expand_range_to_adjacent_whitespaces, find_consecutive_whitespace_position, first_block_arg_name, here_document?, in_explicit_parentheses?, indentation_of_line, line_range, literal?, node_id, proc_literal?, range_from_arg

Constructor Details

#initialize(rspec_configure, source_rewriter) ⇒ Framework

Returns a new instance of Framework.



14
15
16
17
# File 'lib/transpec/syntax/rspec_configure/framework.rb', line 14

def initialize(rspec_configure, source_rewriter)
  @rspec_configure = rspec_configure
  @source_rewriter = source_rewriter
end

Instance Attribute Details

#rspec_configureObject (readonly)

Returns the value of attribute rspec_configure.



12
13
14
# File 'lib/transpec/syntax/rspec_configure/framework.rb', line 12

def rspec_configure
  @rspec_configure
end

#source_rewriterObject (readonly)

Returns the value of attribute source_rewriter.



12
13
14
# File 'lib/transpec/syntax/rspec_configure/framework.rb', line 12

def source_rewriter
  @source_rewriter
end