Class: Cfruby::Cfp_Class
Overview
A Cfruby class contains a list of attributes - i.e a class ‘firewall’ may contain a number of hostnames
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#add(name) ⇒ Object
Add an attribute - allows adding strings and arrays.
-
#initialize(name) ⇒ Cfp_Class
constructor
Create a class with
name
.
Methods inherited from Array
#chmod, #chown, #chown_mod, #create, #exec, #install, #mkdir
Constructor Details
#initialize(name) ⇒ Cfp_Class
Create a class with name
149 150 151 |
# File 'lib/libcfenjin/cfp_classes.rb', line 149 def initialize name @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
146 147 148 |
# File 'lib/libcfenjin/cfp_classes.rb', line 146 def name @name end |
Instance Method Details
#add(name) ⇒ Object
Add an attribute - allows adding strings and arrays
154 155 156 157 158 159 160 161 162 |
# File 'lib/libcfenjin/cfp_classes.rb', line 154 def add name if name.class == 'String' push name else name.each do | n | push n end end end |