Class: Benry::CmdApp::BaseMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/benry/cmdapp.rb

Direct Known Subclasses

ActionMetadata, AliasMetadata

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, desc, tag: nil, important: nil, hidden: nil) ⇒ BaseMetadata

Returns a new instance of BaseMetadata.



250
251
252
253
254
255
256
# File 'lib/benry/cmdapp.rb', line 250

def initialize(name, desc, tag: nil, important: nil, hidden: nil)
  @name      = name
  @desc      = desc
  @tag       = tag        if nil != tag
  @important = important  if nil != important
  @hidden    = hidden     if nil != hidden
end

Instance Attribute Details

#descObject (readonly)

Returns the value of attribute desc.



258
259
260
# File 'lib/benry/cmdapp.rb', line 258

def desc
  @desc
end

#hiddenObject (readonly) Also known as: hidden?

Returns the value of attribute hidden.



258
259
260
# File 'lib/benry/cmdapp.rb', line 258

def hidden
  @hidden
end

#importantObject (readonly) Also known as: important?

Returns the value of attribute important.



258
259
260
# File 'lib/benry/cmdapp.rb', line 258

def important
  @important
end

#nameObject (readonly)

Returns the value of attribute name.



258
259
260
# File 'lib/benry/cmdapp.rb', line 258

def name
  @name
end

#tagObject (readonly)

Returns the value of attribute tag.



258
259
260
# File 'lib/benry/cmdapp.rb', line 258

def tag
  @tag
end

Instance Method Details

#alias?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


262
263
264
# File 'lib/benry/cmdapp.rb', line 262

def alias?()
  raise NotImplementedError.new("#{self.class.name}#alias?(): not implemented yet.")
end