Class: Construqt::Flavour::Ciscian::MultiValueVerb
- Inherits:
-
Object
- Object
- Construqt::Flavour::Ciscian::MultiValueVerb
- Defined in:
- lib/construqt/flavour/ciscian/ciscian.rb
Instance Attribute Summary collapse
-
#section ⇒ Object
Returns the value of attribute section.
-
#values ⇒ Object
Returns the value of attribute values.
Class Method Summary collapse
Instance Method Summary collapse
- #add(value) ⇒ Object
-
#initialize(section) ⇒ MultiValueVerb
constructor
A new instance of MultiValueVerb.
- #no ⇒ Object
- #serialize ⇒ Object
- #yes ⇒ Object
Constructor Details
#initialize(section) ⇒ MultiValueVerb
Returns a new instance of MultiValueVerb.
287 288 289 290 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 287 def initialize(section) self.section=section self.values = [] end |
Instance Attribute Details
#section ⇒ Object
Returns the value of attribute section.
286 287 288 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 286 def section @section end |
#values ⇒ Object
Returns the value of attribute values.
286 287 288 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 286 def values @values end |
Class Method Details
.compare(nu, old) ⇒ Object
315 316 317 318 319 320 321 322 323 324 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 315 def self.compare(nu, old) return [nu] unless old return [old.no] unless nu throw "classes must match #{nu.class.name} != #{old.class.name}" unless nu.class == old.class if (nu.serialize==old.serialize) [nil] else [nu] end end |
Instance Method Details
#add(value) ⇒ Object
292 293 294 295 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 292 def add(value) self.values << value self end |
#no ⇒ Object
297 298 299 300 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 297 def no @no="no " self end |
#serialize ⇒ Object
307 308 309 310 311 312 313 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 307 def serialize if @no ["#{@no}#{section}"] else ["#{section} #{values.join(",")}"] end end |
#yes ⇒ Object
302 303 304 305 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 302 def yes @no=nil self end |