Class: Nexus::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/nexus/model/items.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Item

Returns a new instance of Item.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/nexus/model/items.rb', line 5

def initialize(params)		
	@id = params["id"]
	@name = params["name"]
	@gold_base = params["gold"]["base"]			
	@gold_total = params["gold"]["total"]						
	@gold_sell = params["gold"]["sell"]
	@description = params["description"]
	@sanitizedDescription = params["sanitizedDescription"]
	@colloq = params["colloq"]
	@plaintext = params["plaintext"]
	@consumable = params["consumed"]
	@stacks = params["stacks"]
	@tags = params["tags"]			
	@image = params["image"]
	@stats = params["stats"]
end

Instance Attribute Details

#colloqObject (readonly)

Returns the value of attribute colloq.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def colloq
  @colloq
end

#consumableObject (readonly)

Returns the value of attribute consumable.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def consumable
  @consumable
end

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def description
  @description
end

#gold_baseObject (readonly)

Returns the value of attribute gold_base.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def gold_base
  @gold_base
end

#gold_sellObject (readonly)

Returns the value of attribute gold_sell.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def gold_sell
  @gold_sell
end

#gold_totalObject (readonly)

Returns the value of attribute gold_total.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def gold_total
  @gold_total
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def id
  @id
end

#imageObject (readonly)

Returns the value of attribute image.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def image
  @image
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def name
  @name
end

#plaintextObject (readonly)

Returns the value of attribute plaintext.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def plaintext
  @plaintext
end

#sanitizedDescriptionObject (readonly)

Returns the value of attribute sanitizedDescription.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def sanitizedDescription
  @sanitizedDescription
end

#stacksObject (readonly)

Returns the value of attribute stacks.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def stacks
  @stacks
end

#statsObject (readonly)

Returns the value of attribute stats.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def stats
  @stats
end

#tagsObject (readonly)

Returns the value of attribute tags.



3
4
5
# File 'lib/nexus/model/items.rb', line 3

def tags
  @tags
end