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, #uninstall
Constructor Details
#initialize(name) ⇒ Cfp_Class
Create a class with name
154 155 156 |
# File 'lib/libcfenjin/cfp_classes.rb', line 154 def initialize name @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
151 152 153 |
# File 'lib/libcfenjin/cfp_classes.rb', line 151 def name @name end |
Instance Method Details
#add(name) ⇒ Object
Add an attribute - allows adding strings and arrays
159 160 161 162 163 164 165 166 167 |
# File 'lib/libcfenjin/cfp_classes.rb', line 159 def add name if name.class == 'String' push name else name.each do | n | push n end end end |