Class: Hyraft::Rule::Circuit::PortCommand::Command
- Inherits:
-
Data
- Object
- Data
- Hyraft::Rule::Circuit::PortCommand::Command
- Defined in:
- lib/hyraft/rule/circuit/port_command.rb
Instance Attribute Summary collapse
-
#resource_name ⇒ Object
readonly
Returns the value of attribute resource_name.
-
#target_dir ⇒ Object
readonly
Returns the value of attribute target_dir.
Instance Method Summary collapse
- #class_name ⇒ Object
- #filename ⇒ Object
- #full_path ⇒ Object
- #plural_name ⇒ Object
- #port_dir ⇒ Object
- #singular_name ⇒ Object
Instance Attribute Details
#resource_name ⇒ Object (readonly)
Returns the value of attribute resource_name
11 12 13 |
# File 'lib/hyraft/rule/circuit/port_command.rb', line 11 def resource_name @resource_name end |
#target_dir ⇒ Object (readonly)
Returns the value of attribute target_dir
11 12 13 |
# File 'lib/hyraft/rule/circuit/port_command.rb', line 11 def target_dir @target_dir end |
Instance Method Details
#class_name ⇒ Object
14 |
# File 'lib/hyraft/rule/circuit/port_command.rb', line 14 def class_name = plural_name.capitalize |
#filename ⇒ Object
15 |
# File 'lib/hyraft/rule/circuit/port_command.rb', line 15 def filename = "#{plural_name}_port.rb" |
#full_path ⇒ Object
17 |
# File 'lib/hyraft/rule/circuit/port_command.rb', line 17 def full_path = File.join(port_dir, filename) |
#plural_name ⇒ Object
12 |
# File 'lib/hyraft/rule/circuit/port_command.rb', line 12 def plural_name = resource_name.downcase |
#port_dir ⇒ Object
16 |
# File 'lib/hyraft/rule/circuit/port_command.rb', line 16 def port_dir = File.join(target_dir, "circuit", "ports") |
#singular_name ⇒ Object
13 |
# File 'lib/hyraft/rule/circuit/port_command.rb', line 13 def singular_name = plural_name.chomp('s') |