Class: Gemrat::Gem

Inherits:
Struct
  • Object
show all
Defined in:
lib/gemrat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Gem

Returns a new instance of Gem.



12
13
14
15
# File 'lib/gemrat.rb', line 12

def initialize(*args)
  super
  self.valid = true
end

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/gemrat.rb', line 9

def name
  @name
end

#validObject Also known as: valid?

Returns the value of attribute valid

Returns:

  • (Object)

    the current value of valid



9
10
11
# File 'lib/gemrat.rb', line 9

def valid
  @valid
end

Instance Method Details

#invalid!Object



17
18
19
# File 'lib/gemrat.rb', line 17

def invalid!
  self.valid = false
end