Class: SpecForge::CLI::New::Proxy
- Inherits:
-
Object
- Object
- SpecForge::CLI::New::Proxy
- Defined in:
- lib/spec_forge/cli/new.rb
Overview
Helper class for passing template variables to Thor templates
Instance Attribute Summary collapse
-
#original_name ⇒ String
readonly
The original name passed to the command.
-
#plural_name ⇒ String
readonly
The plural form of the name.
-
#singular_name ⇒ String
readonly
The singular form of the name.
Instance Method Summary collapse
-
#call ⇒ Binding
Returns a binding for use in templates.
-
#initialize(name) ⇒ Proxy
constructor
Creates a new Proxy with the specified name.
Constructor Details
#initialize(name) ⇒ Proxy
Creates a new Proxy with the specified name
166 167 168 169 170 |
# File 'lib/spec_forge/cli/new.rb', line 166 def initialize(name) @original_name = name @plural_name = name.pluralize @singular_name = name.singularize end |
Instance Attribute Details
#original_name ⇒ String (readonly)
The original name passed to the command
143 144 145 |
# File 'lib/spec_forge/cli/new.rb', line 143 def original_name @original_name end |
#plural_name ⇒ String (readonly)
The plural form of the name
157 158 159 |
# File 'lib/spec_forge/cli/new.rb', line 157 def plural_name @plural_name end |
#singular_name ⇒ String (readonly)
The singular form of the name
150 151 152 |
# File 'lib/spec_forge/cli/new.rb', line 150 def singular_name @singular_name end |
Instance Method Details
#call ⇒ Binding
Returns a binding for use in templates
177 178 179 |
# File 'lib/spec_forge/cli/new.rb', line 177 def call binding end |